Home:ALL Converter>how usb gadget driver upper layer driver get loaded?

how usb gadget driver upper layer driver get loaded?

Ask Time:2022-03-04T15:56:45         Author:root

Json Formatter

My embedded linux board has usb-net gadget functionality. From my host computer I am able to establish ethernet over usb connectivity. I am trying to understand how the different layers of the usb gadget subsystem layers work together.

In the device tree, I can see the platform specific udc driver and in the kernel configuration I can see the USB Gadget and Ethernet Gadget support being enabled in the kernel drivers. So as I understand the g_ether driver gets built-in part of the kernel.

What configuration creates the usb gadget interface and endpoint and links it to the upper layer driver (g_ether) and creates the usb-net gadget ethernet interface ? Where to define the usb class function of the gadget and load a different upper layer driver ?

Author:root,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/71348182/how-usb-gadget-driver-upper-layer-driver-get-loaded
yy