lkml.org 
[lkml]   [2014]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC v2 2/2] usb: phy: Temporarily hold wakeupsource on charger connect and disconnect events
From
On Tue, Sep 2, 2014 at 7:54 AM, Felipe Balbi <balbi@ti.com> wrote:
> Hi,
>
> On Tue, Sep 02, 2014 at 05:19:18PM +0530, Kiran Kumar Raparthy wrote:
...
>> 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 ?

It temporarily holds a timed wakeup source on USB disconnect events,
to allow the rest of the system time to react to the USB disconnection
(dropping host sessions, updating charger status, etc.) prior to
re-allowing suspend.


Todd


\
 
 \ /
  Last update: 2014-09-05 10:21    [W:0.326 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site