Re: [RFC v5] usb: phy: Hold wakeupsource when USB is enumerated in peripheral mode
From: Felipe Balbi
Date: Wed Nov 05 2014 - 14:40:26 EST
On Tue, Nov 04, 2014 at 03:30:54PM +0530, Kiran Kumar Raparthy wrote:
> From: Todd Poynor <toddpoynor@xxxxxxxxxx>
>
> usb: phy: Hold wakeupsource when USB is enumerated in peripheral mode
>
> Some systems require a mechanism to prevent system to enter into suspend
> state when USB is connected and enumerated in peripheral mode.
>
> This patch provides an interface to hold a wakeupsource to prevent suspend.
> PHY drivers can use this interface when USB is connected and enumerated in
> peripheral mode.
>
> A timed wakeupsource is temporarily held on USB disconnect events, to allow
> the rest of the system to react to the USB disconnection (dropping host
> sessions, updating charger status, etc.) prior to re-allowing suspend.
>
> Cc: Kishon Vijay Abraham I <kishon@xxxxxx>
> Cc: Felipe Balbi <balbi@xxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Cc: Android Kernel Team <kernel-team@xxxxxxxxxxx>
> Cc: John Stultz <john.stultz@xxxxxxxxxx>
> Cc: Sumit Semwal <sumit.semwal@xxxxxxxxxx>
> Cc: Arve Hjøå<arve@xxxxxxxxxxx>
> Cc: Benoit Goby <benoit@xxxxxxxxxxx>
> Signed-off-by: Todd Poynor <toddpoynor@xxxxxxxxxx>
> [kiran: Added context to commit message, squished build fixes
> from Benoit Goby and Arve Hjøå changed wakelocks usage
> to wakeupsource, merged Todd's refactoring logic and simplified
> the structures and code and addressed community feedback]
> Signed-off-by: Kiran Raparthy <kiran.kumar@xxxxxxxxxx>
you still didn't get this right. I asked that you introduce
usb_phy_set_event() as a separate patch, then make PHY drivers use it
and only on a third patch should you hold a wakeupsource.
--
balbi
Attachment:
signature.asc
Description: Digital signature