I am understanding usb_new_device() function. I have a question related to usb_enumerate_device() function calling inside usb_new_device().
As per the comments above the function, it reads configs/intfs/otg. But I didn't see in the function definition that it is reading the interface descriptor.
It seems the function is reading config descriptor and doing something for OTG devices. I am not seeing the source related to interface descriptor reading. I am missing something here. linux
usb_enumerate_device()
=>usb_get_configuration()
=>usb_parse_configuration()
=>usb_parse_interface()
. - Ian Abbottusb_parse_configuration()
andusb_parse_interface()
functions are to parse the descriptors, which already read from the device. I could seeusb_get_descriptor(dev, USB_DT_CONFIG, cfgno,bigbuffer,length)
call insideusb_get_configuration()
is submitting control message to the device to read configuration descriptor. As the comment againstusb_enumerate_device()
says Read descriptors, I am looking for a call tousb_get_descriptor()
withUSB_DT_INTERFACE
as argument. - user3693586