The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Todd Poynor <toddpoynor@google.com>
Cc: <balbi@ti.com>, Kiran Kumar Raparthy <kiran.kumar@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	John Stultz <john.stultz@linaro.org>,
	Badhri Jagan Sridharan <badhri@google.com>,
	Ruchi Kandoi <kandoiruchi@google.com>
Subject: Re: [RFC v2 2/2] usb: phy: Temporarily hold wakeupsource on charger connect and disconnect events
Date: Fri, 5 Sep 2014 09:19:45 -0500	[thread overview]
Message-ID: <20140905141945.GC24449@saruman.home> (raw)
In-Reply-To: <CAAW3YpZJ0JrYL4OxJ18Vq1kVWVWN+XFRBkTbgDS5SFUQ6HUJqg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On Fri, Sep 05, 2014 at 12:40:22AM -0700, Todd Poynor wrote:
> 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.

alright, please add a note like this to commit log.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-09-05 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 11:49 [RFC v2 2/2] usb: phy: Temporarily hold wakeupsource on charger connect and disconnect events Kiran Kumar Raparthy
2014-09-02 14:54 ` Felipe Balbi
2014-09-05  7:40   ` Todd Poynor
2014-09-05 14:19     ` Felipe Balbi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140905141945.GC24449@saruman.home \
    --to=balbi@ti.com \
    --cc=badhri@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=kandoiruchi@google.com \
    --cc=kernel-team@android.com \
    --cc=kiran.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=toddpoynor@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox