usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
RFC v3 2/2 usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
From: Todd Poynor <[email protected]>
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
[kiran: Added context to commit message and
addressed community feedback]
---
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(-)
drivers/usb/phy/otg-wakeupsource.c +2 -1
@@ -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 :
include/linux/usb/phy.h +2 -0
@@ -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 ,
Signature · 1 line
1.8.2.1
Hello.
Quoted 4 lines · Kiran Kumar Raparthy
From: Todd Poynor <[email protected]>
usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
No need to duplicate the summary.
Quoted 1 line
It temporarily holds a timed wakeup source on USB disconnect events, to allow
What "it"?
Quoted 11 lines
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 <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Android Kernel Team <[email protected]>Cc John Stultz <[email protected]>Cc Sumit Semwal <[email protected]>Signed-off-by Todd Poynor <[email protected]>
Quoted 3 lines
[kiran: Added context to commit message and
addressed community feedback]Signed-off-by Kiran Raparthy <[email protected]>
WBR, Sergei
A message that is not in the archive (sent off-list or not yet received): CA+RfmHbaf=FBD8jYbigoUKB=BE8pmRwjp2RFM9xoU4-dq9=3UA@mail.gmail.com
Hello.
Quoted 7 lines · Kiran Raparthy
Quoted 6 lines
Quoted 4 lines
From: Todd Poynor <[email protected] <mailto:[email protected]>>
usb: phy: Temporarily hold timed wakeup source on charger and disconnect events
No need to duplicate the summary.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
It temporarily holds a timed wakeup source on USB disconnect events, to allow
What "it"?I was referring to "This patch" ,if required,i can change the terminology. Regards,
Kiran
Yes, please. Just write "Temporarily hold ...", no need for a noun.
And please don't send HTML mails to the mailing list (it should bounce them anyway).
WBR, Sergei
Hi,
Quoted 45 lines · Kiran Kumar Raparthy
From: Todd Poynor <[email protected]>
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 <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Android Kernel Team <[email protected]>Cc John Stultz <[email protected]>Cc Sumit Semwal <[email protected]>Signed-off-by Todd Poynor <[email protected]>[kiran: Added context to commit message and
addressed community feedback]Signed-off-by Kiran Raparthy <[email protected]>---
v3:
* Modified the commit log.
* Remove indirect functionusb_temporary_hold_wsourceand call__pm_wakeup_evendirectly.v2:
* Implementusb_temporary_hold_wsourcefunction 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(-)drivers/usb/phy/otg-wakeupsource.c +0
-0
drivers/usb/phy/otg-wakeupsource.c static void otgws_handle_event(struct usb_phy *otgws_xceiv, unsigned long event) · line 51
Quoted 6 lines
drivers/usb/phy/otg-wakeupsource.c +2
-1@@ -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.
Signature · 1 line
balbi