Hello, I recently started to develop a USB kernel driver for a GoogleSummer Of Code project and I'm running in some small issues. The source code is available at https://github.com/ungureanuvladvictor/ADK-Driver/blob/master/adk-driver.c . The driver matches the VID/PID of a LG Nexus5 and tries in the probe function to switch it to ADK Mode *Accessory Development Kit Mode*. Afterwards the same driver should deal with the device in ADK Mode and should find it's bulk IN/OUT EPs. The problem is that my probe callback is called twice for each mode of the device, normal mode and ADK mode. If you look at this Gist: https://gist.github.com/ungureanuvladvictor/44bc345037916bbd0bf1 lines 19 and 25 is where the probe function is called for the normal device. Lines 58 and 66 are for the device in ADK mode. As I read from the documentation the probe callback is called when a device that matches my device_table is found by the usb core. In the log I see that the usb core calls probe for each interface it has: lines 16, 22 and 55, 63. If you have any hints about this or maybe I'm doing something really wrong in my driver help would be appreciated. I'm a bit new in this driver world and trying to find my way around :). Best, -- Vlad Ungureanu
Attachment:
signature.asc
Description: Digital signature