On 10.04.2013 10:09, Felipe Balbi wrote: > On Wed, Apr 10, 2013 at 09:10:19AM +0200, Daniel Mack wrote: >> On 08.04.2013 12:38, B, Ravi wrote: >>> Felipe >>> >>>> Hi, >>>> >>>> On Mon, Apr 08, 2013 at 12:25:38PM +0200, B, Ravi wrote: >>>>> Daniel >>>>> >>>>>> On 08.04.2013 09:57, B, Ravi wrote: >>>>>>>> Hi all, >>>>>>>> >>>>>>>> here are some patches to separate the HCD and gadget part >>>>>>>> of the >>>> musb >>>>>>>> driver so they can be deselected in Kconfig. They also make >>>>>>>> the >>>> driver >>>>>>>> keep track of the configured port mode that is set from DT, >>>>>>>> so the actual runtime configuration can be selected >>>>>>>> dynamically. >>>>>>>> >>>>>>>> One thing that is still broken is that once pm_suspend() >>>>>>>> was called >>>> on >>>>>>>> a musb device on a USB disconnect, the port won't wake up >>>>>>>> again >>>> when a >>>>>>>> device is plugged back in. >>>>>>> >>>>>>> This could be due to SESSION bit removal when root port is >>>> disconnected >>>>>> in otg_timer function. >>>>>> >>>>>> Not sure if we are thinking about the same details, but after >>>>>> debuging this a further, turns out that >>>>>> musb_platform_try_idle() eventually switches off the entire >>>>>> controller, which then leads to DRVBUS going >>>> low >>>>>> on the board. That, in turn, prevents the interrupt from being >>>> triggered >>>>>> on reconnect, because the host port is not powered anymore. >>>>>> >>>>>> I don't know yet how to cope with that, but for now, I simply >>>>>> disabled the call from musb_stage0_irq() to >>>>>> musb_platform_try_idle() locally. >>>>> >>>>> The otg_timer() gets invoked, which removes the session when no >>>>> device connected to root controller, this is required in otg or >>>>> dual role mode (Not for host-only mode). Because otg state is >>>>> un-defined till user's connected a-side of b-side of cable. >>>> >>>> Embedded hosts might also want this to save some power while no >>>> devices are connected. I guess most of those devices would rely on >>>> SRP or on a polling method to enable VBUS. >>> >>> Yes, in case of true otg, SRP wakesup the device to enable VBUS. >>> >>> By 'polling' I mean that e.g. every 2 >>>> seconds turn vbus on, if no device are enumerated in 200ms, then >>>> sleep for another 2 seconds. >>> >>> Yes, we had this workaround mechanism enabled on some earlier davinci >>> platform by setting the session periodically to check any device >>> connected for host or otg/dual-role controller to save VBUS power >>> when no device connected. >> >> However, this workaround doesn't seem to work anymore. >> >> Anyway, I think we can address this issue separately from the patch set >> I submitted. > > correct > Ok, I'll amend my patches to include Peter's reports and resend? Or should I wait for more comments from you? Thanks, Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html