Peter/Felipe,
On 01/09/2020 05:33, Peter Chen wrote:
If the board uses role switch class for switching the role, it should
not depends on SoC OTG hardware siginal any more, so quit early.
Signed-off-by: Peter Chen <peter.chen@xxxxxxx>
---
drivers/usb/cdns3/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index faee5ec5fc20..96c2da4e20c5 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -280,6 +280,10 @@ int cdns3_hw_role_switch(struct cdns3 *cdns)
enum usb_role real_role, current_role;
int ret = 0;
+ /* Depends on role switch class */
+ if (cdns->role_sw)
+ return 0;
+
This breaks h/w based role switching for us.
cdsn->role_sw would always be non zero, right, which means h/w based role swithching
will be bypassed for all platforms.
pm_runtime_get_sync(cdns->dev);
current_role = cdns->role;
cheers,
-roger
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki