Role Switch Driver on DWC3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

As per my understanding, role switch interface for DWC3 controller will be called in dwc3_drd_init.

However, dwc3_drd_init is called only if mode is USB_DR_MODE_OTG. However for USB3 V3.3 and above the following code exists.

/*
         * DWC_usb31 and DWC_usb3 v3.30a and higher do not support OTG
         * mode. If the controller supports DRD but the dr_mode is not
         * specified or set to OTG, then set the mode to peripheral.
         */
        if (mode == USB_DR_MODE_OTG &&
            dwc->revision >= DWC3_REVISION_330A)
            mode = USB_DR_MODE_PERIPHERAL;
    }

Hence, in this case role switch interface will never will be called.


Please clear my understanding, and in such case how can i use the role switch driver?


Regards

Nehal Shah





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux