* [RFC v3 2/2] usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
@ 2014-09-08 10:10 Kiran Kumar Raparthy
2014-09-08 10:45 ` Sergei Shtylyov
2014-09-08 13:39 ` Felipe Balbi
0 siblings, 2 replies; 4+ messages in thread
From: Kiran Kumar Raparthy @ 2014-09-08 10:10 UTC (permalink / raw)
To: linux-kernel
Cc: Todd Poynor, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
Android Kernel Team, John Stultz, Sumit Semwal, Kiran Raparthy
From: Todd Poynor <toddpoynor@google.com>
usb: phy: Temporarily hold timed wakeup source on charger and disconnect
events
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
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>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
[kiran: Added context to commit message and
addressed community feedback]
Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
---
v3:
* Modified the commit log.
* Remove indirect function usb_temporary_hold_wsource and call
__pm_wakeup_even directly.
v2:
* Implement usb_temporary_hold_wsource function in phy.
v1:
* Removed the refactoring logic from this integrated into main driver code.
RFC:
* Integrated the refactoring logic and logic to hold wakeupsource
temporarily.
drivers/usb/phy/otg-wakeupsource.c | 3 ++-
include/linux/usb/phy.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/phy/otg-wakeupsource.c b/drivers/usb/phy/otg-wakeupsource.c
index d9a1720..7bc9657 100644
--- a/drivers/usb/phy/otg-wakeupsource.c
+++ b/drivers/usb/phy/otg-wakeupsource.c
@@ -47,7 +47,8 @@ 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:
- __pm_relax(&otgws_xceiv->wsource);
+ __pm_wakeup_event(&otgws_xceiv->wsource,
+ msecs_to_jiffies(TEMPORARY_HOLD_TIME));
break;
default:
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index c71cf15..f8f9f1f 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -12,6 +12,8 @@
#include <linux/notifier.h>
#include <linux/usb.h>
+#define TEMPORARY_HOLD_TIME 2000
+
enum usb_phy_interface {
USBPHY_INTERFACE_MODE_UNKNOWN,
USBPHY_INTERFACE_MODE_UTMI,
--
1.8.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC v3 2/2] usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
2014-09-08 10:10 [RFC v3 2/2] usb: phy: Temporarily hold timed wakeup source on charger and disconnect events Kiran Kumar Raparthy
@ 2014-09-08 10:45 ` Sergei Shtylyov
[not found] ` <CA+RfmHbaf=FBD8jYbigoUKB=BE8pmRwjp2RFM9xoU4-dq9=3UA@mail.gmail.com>
2014-09-08 13:39 ` Felipe Balbi
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2014-09-08 10:45 UTC (permalink / raw)
To: Kiran Kumar Raparthy, linux-kernel
Cc: Todd Poynor, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
Android Kernel Team, John Stultz, Sumit Semwal
Hello.
On 9/8/2014 2:10 PM, Kiran Kumar Raparthy wrote:
> From: Todd Poynor <toddpoynor@google.com>
> usb: phy: Temporarily hold timed wakeup source on charger and disconnect
> events
No need to duplicate the summary.
> It temporarily holds a timed wakeup source on USB disconnect events, to allow
What "it"?
> the rest of the system time to react to the USB disconnection (dropping host
> sessions, updating charger status, etc.) prior to re-allowing suspend
> 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>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> [kiran: Added context to commit message and
> addressed community feedback]
> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC v3 2/2] usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
2014-09-08 10:10 [RFC v3 2/2] usb: phy: Temporarily hold timed wakeup source on charger and disconnect events Kiran Kumar Raparthy
2014-09-08 10:45 ` Sergei Shtylyov
@ 2014-09-08 13:39 ` Felipe Balbi
1 sibling, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2014-09-08 13:39 UTC (permalink / raw)
To: Kiran Kumar Raparthy
Cc: linux-kernel, Todd Poynor, Felipe Balbi, Greg Kroah-Hartman,
linux-usb, Android Kernel Team, John Stultz, Sumit Semwal
[-- Attachment #1: Type: text/plain, Size: 2260 bytes --]
Hi,
On Mon, Sep 08, 2014 at 03:40:49PM +0530, Kiran Kumar Raparthy wrote:
> From: Todd Poynor <toddpoynor@google.com>
>
> usb: phy: Temporarily hold timed wakeup source on charger and disconnect
> events
>
> 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
>
> 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>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> [kiran: Added context to commit message and
> addressed community feedback]
> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org>
> ---
> v3:
> * Modified the commit log.
> * Remove indirect function usb_temporary_hold_wsource and call
> __pm_wakeup_even directly.
>
> v2:
> * Implement usb_temporary_hold_wsource function in phy.
>
> v1:
> * Removed the refactoring logic from this integrated into main driver code.
>
> RFC:
> * Integrated the refactoring logic and logic to hold wakeupsource
> temporarily.
>
> drivers/usb/phy/otg-wakeupsource.c | 3 ++-
> include/linux/usb/phy.h | 2 ++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/phy/otg-wakeupsource.c b/drivers/usb/phy/otg-wakeupsource.c
> index d9a1720..7bc9657 100644
> --- a/drivers/usb/phy/otg-wakeupsource.c
> +++ b/drivers/usb/phy/otg-wakeupsource.c
> @@ -47,7 +47,8 @@ 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:
> - __pm_relax(&otgws_xceiv->wsource);
> + __pm_wakeup_event(&otgws_xceiv->wsource,
> + msecs_to_jiffies(TEMPORARY_HOLD_TIME));
this was introduced by patch 1, why don't you merge this with that
patch? This is another comment that I have already provided. Why are you
ignoring my comments ? At a minimum, explain why are you ignoring them.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-08 16:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 10:10 [RFC v3 2/2] usb: phy: Temporarily hold timed wakeup source on charger and disconnect events Kiran Kumar Raparthy
2014-09-08 10:45 ` Sergei Shtylyov
[not found] ` <CA+RfmHbaf=FBD8jYbigoUKB=BE8pmRwjp2RFM9xoU4-dq9=3UA@mail.gmail.com>
2014-09-08 16:15 ` Sergei Shtylyov
2014-09-08 13:39 ` Felipe Balbi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.