From: Felipe Balbi <balbi@ti.com>
To: Kiran Kumar Raparthy <kiran.kumar@linaro.org>
Cc: <linux-kernel@vger.kernel.org>,
Todd Poynor <toddpoynor@google.com>, Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>,
Android Kernel Team <kernel-team@android.com>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [RFC v1 2/2] usb: otg: Temporarily hold wakeupsource on charger
Date: Fri, 29 Aug 2014 15:55:35 -0500 [thread overview]
Message-ID: <20140829205535.GG16391@saruman.home> (raw)
In-Reply-To: <1409220399-28425-1-git-send-email-kiran.kumar@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 2254 bytes --]
On Thu, Aug 28, 2014 at 03:36:39PM +0530, Kiran Kumar Raparthy wrote:
> From: Todd Poynor <toddpoynor@google.com>
>
> usb: otg: 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@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: Android Kernel Team <kernel-team@android.com>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> [kiran: Added context to commit message]
> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
> ---
> drivers/usb/phy/otg-wakeupsource.c | 10 +++++++---
> include/linux/usb/otg.h | 2 ++
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/phy/otg-wakeupsource.c b/drivers/usb/phy/otg-wakeupsource.c
> index 7c838d1..9f3c5c1 100644
> --- a/drivers/usb/phy/otg-wakeupsource.c
> +++ b/drivers/usb/phy/otg-wakeupsource.c
> @@ -34,8 +34,11 @@ struct otgws_lock {
> struct wakeup_source wsource;
> };
>
> -/* VBUS present lock */
> -
> +/*
> + * VBUS present lock. Also used as a timed lock on charger
> + * connect/disconnect and USB host disconnect, to allow the system
> + * to react to the change in power.
> + */
> static struct otgws_lock vbus_lock;
>
> static void otgws_handle_event(unsigned long event)
> @@ -59,7 +62,8 @@ static void otgws_handle_event(unsigned long event)
> case USB_EVENT_NONE:
> case USB_EVENT_ID:
> case USB_EVENT_CHARGER:
> - __pm_relax(&vbus_lock.wsource);
> + __pm_wakeup_event(&vbus_lock.wsource,
> + msecs_to_jiffies(TEMPORARY_HOLD_TIME));
indentation here is wrong. Also, I have gotten three patches from you
with very similar contents and subject. Please make sure to read
Documentation/SubmittingPatches, Documentation/CodingStyle and
Documentation/SubmitChecklist
cheers
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-08-29 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 10:06 Kiran Kumar Raparthy
2014-08-29 20:55 ` 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=20140829205535.GG16391@saruman.home \
--to=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=john.stultz@linaro.org \
--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
all inboxes | Powered by JetHome®