Hi, On Wed, Aug 27, 2014 at 02:58:30PM -0700, Todd Poynor wrote: > 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. aaaaah, that's because Android freezes userspace right ? > 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. it's best to do it per-PHY, but it doesn't have to be written into each and every PHY driver, do it at the core and abstract that away from PHY drivers. -- balbi
Attachment:
signature.asc
Description: Digital signature