[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140902145435.GF16872@saruman.home>
Date: Tue, 2 Sep 2014 09:54:35 -0500
From: Felipe Balbi <balbi@...com>
To: Kiran Kumar Raparthy <kiran.kumar@...aro.org>
CC: <linux-kernel@...r.kernel.org>,
Todd Poynor <toddpoynor@...gle.com>,
Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>,
Android Kernel Team <kernel-team@...roid.com>,
John Stultz <john.stultz@...aro.org>
Subject: Re: [RFC v2 2/2] usb: phy: Temporarily hold wakeupsource on charger
connect and disconnect events
Hi,
On Tue, Sep 02, 2014 at 05:19:18PM +0530, Kiran Kumar Raparthy wrote:
> From: Todd Poynor <toddpoynor@...gle.com>
>
> usb: phy: Temporarily hold wakeupsource on charger connect and disconnect
> events
>
> Allow other parts of the system to react to the charger connect/disconnect
> event without allowing the system to suspend before the other parts can process
> the event. This wakeup_source times out after 2 seconds; if nobody else holds a
> wakeup_source by that time then the device can sleep.
>
> Cc: Felipe Balbi <balbi@...com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-usb@...r.kernel.org
> Cc: Android Kernel Team <kernel-team@...roid.com>
> Cc: John Stultz <john.stultz@...aro.org>
> Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
> [kiran: Added context to commit message
> wakeupsource handling implemented per PHY in phy core]
> Signed-off-by: Kiran Raparthy <kiran.kumar@...aro.org>
> ---
> drivers/usb/phy/otg-wakeupsource.c | 2 +-
> drivers/usb/phy/phy.c | 10 ++++++++++
> include/linux/usb/phy.h | 3 +++
> 3 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/phy/otg-wakeupsource.c b/drivers/usb/phy/otg-wakeupsource.c
> index fca2010..70fa05e 100644
> --- a/drivers/usb/phy/otg-wakeupsource.c
> +++ b/drivers/usb/phy/otg-wakeupsource.c
> @@ -48,7 +48,7 @@ static void otgws_handle_event(struct usb_phy *otgws_xceiv, unsigned long event)
> case USB_EVENT_NONE:
> case USB_EVENT_ID:
> case USB_EVENT_CHARGER:
> - usb_drop_wsource(otgws_xceiv);
> + usb_temporary_hold_wsource(otgws_xceiv);
looks like this won't work. You're holding the lock even on
USB_EVEN_NONE. Why ?
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists