Udc-core not recognising gadget drivers. Adding to list of pending drivers

Hello. Sorry for the late reply. I was able to compile the kernel and access the menuconfig. I enabled the gadget support. I used /opt/nv4-l4t-device-mode.sh script (need to write “exit 0”) to prevent autoload of the gadget on boot. I then tried inserting my own driver module, but the dmesg says :
“failed to start error -2”
I am not sure how to solve this. I was able to load a gadget using the steps provided here. But, I am not able to load my own gadget module.