Re: [RFC 11/19] dwc3: add OTG handling code
From: George Cherian
Date: Thu Mar 19 2015 - 03:38:21 EST
Hi Robert,
On Wed, Mar 18, 2015 at 7:34 PM, Robert Baldyga <r.baldyga@xxxxxxxxxxx> wrote:
>
> This patch introduces OTG support in DWC3 driver. OTG feature is responsible
> for dynamic USB role switching (between host and peripheral modes) based
> on detected cable type.
>
> Each role switch causes complete core reinitialization. In peripheral
Do you really want to do complete core reinitialization?
While switching to HOST mode you might need to issue a LHRESET and
while switching
to Device mode make sure you re-initiallize the event buffer addresses.
If LHRESET is not used then you should do what you have done.
But I don't think adding and removing the platform_device for XHCI is
the way to go.
This might impact SoC's which really implement the OTG for DWC3.
I made an attempt on the same and could'nt work on it more.
This still has some issues, but could be fixed.
https://lkml.org/lkml/2014/11/25/600
> mode UDC device is activated using VBUS session control mechanism. In
> host mode the new XHCI device is registered to make bus visible in system.
>
> This code is inspired by DWC3 driver from Hardkernel Linux sources [1].
>
> [1] https://github.com/hardkernel/linux.
>
> Signed-off-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
Regards
-George
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/