Re: [RFC 1/2] USB: OTG: Hold wakeupsource when VBUS present

From: Todd Poynor
Date: Wed Aug 27 2014 - 17:58:37 EST

On Fri, Aug 22, 2014 at 10:12 AM, Felipe Balbi <balbi@xxxxxx> wrote:
> you never explain why this is needed and you have also added some
> information to commit log which shouldn't be here.

Android uses this to prevent suspend from interfering with USB
peripheral traffic, notably adb.

The wakeup source is held only when USB is connected and enumerated
for a host session (I might be using wrong terminology here). It may
not be necessary on a platform that implements wakeup on incoming USB
traffic, although it is likely adb and other protocols would need to
hold wakeup sources at certain times.

>> +static struct otgws_lock vbus_lock;
> should be per-PHY

One of the reasons this was done as a separate driver and via
notifiers was to keep the (original Android wakelock) logic out of the
USB code. If the general idea is something that finds favor with the
USB and PM folks then perhaps adding a wakeup source per PHY in the
PHY driver would be better.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at