kernel configuration for otg-powered board with gadget drivers as modules

Hi,
do you know what is the kernel configuration(s) needed in order to
power the beagle through otg while gadget drivers are configured as
modules?
I need these two conditions to occur at the same time, but I can't find how...
In fact, if I configure the kernel with gadget drivers as module, I
obtain a kernel panic at boot time (otg-powered). Then, if I use a
kernel configuration with built-in gadget drivers, no boot errors
occur, but there's no way to unload the gadget drivers...
If anyone has any suggestion it would be VERY appreciate...
Thanks,

Daniele

I found the right kernel configuration to solve my problem. I had to
set the CONFIG_USB_MUSB_PERIPHERAL config to Y, and then the gadget
drivers can be compiled as loadable modules AND the board can be
powered through otg.

Daniele