All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-06-22 23:52 ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz, linux-rockchip, Douglas Anderson,
	Petr Mladek, Alan Stern, Kumar Gala, Ian Campbell, Rob Herring,
	Pratyush Anand, Peter Chen, Kever Yang, Pawel Moll,
	Robert Schlabbach, Gregory Herrero, Zhuang Jin Can, devicetree,
	Dan Williams, Paul Zimmerman, linux-usb, linux-kernel,
	Matthew Garrett, Mark Rutland

This series of patches, together with
<https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
dts change allow us to wake up from a USB device on rk3288 boards.
The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
The chromeos-3.14 kernel tested included a full set of dwc2 backports
from upstream, so this is expected to function upstream once we get
everything setup there.


Douglas Anderson (3):
  USB: Export usb_wakeup_enabled_descendants()
  Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
  USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

 Documentation/devicetree/bindings/usb/dwc2.txt |  4 +++
 drivers/usb/core/hub.c                         |  7 ++--
 drivers/usb/dwc2/core.h                        |  2 ++
 drivers/usb/dwc2/platform.c                    | 45 ++++++++++++++++++++++++--
 include/linux/usb/hcd.h                        |  5 +++
 5 files changed, 58 insertions(+), 5 deletions(-)

-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-06-22 23:52 ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz-TNX95d0MmH7DzftRWevZcw,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Douglas Anderson, Petr Mladek, Alan Stern, Kumar Gala,
	Ian Campbell, Rob Herring, Pratyush Anand, Peter Chen,
	Kever Yang, Pawel Moll, Robert Schlabbach, Gregory Herrero,
	Zhuang Jin Can, devicetree-u79uwXL29TY76Z2rM5mHXA, Dan Williams,
	Paul Zimmerman, linux-usb

This series of patches, together with
<https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
dts change allow us to wake up from a USB device on rk3288 boards.
The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
The chromeos-3.14 kernel tested included a full set of dwc2 backports
from upstream, so this is expected to function upstream once we get
everything setup there.


Douglas Anderson (3):
  USB: Export usb_wakeup_enabled_descendants()
  Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
  USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled

 Documentation/devicetree/bindings/usb/dwc2.txt |  4 +++
 drivers/usb/core/hub.c                         |  7 ++--
 drivers/usb/dwc2/core.h                        |  2 ++
 drivers/usb/dwc2/platform.c                    | 45 ++++++++++++++++++++++++--
 include/linux/usb/hcd.h                        |  5 +++
 5 files changed, 58 insertions(+), 5 deletions(-)

-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/3] USB: Export usb_wakeup_enabled_descendants()
@ 2015-06-22 23:52   ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz, linux-rockchip, Douglas Anderson,
	Alan Stern, Petr Mladek, Peter Chen, Pratyush Anand,
	Matthew Garrett, Robert Schlabbach, Dan Williams, Zhuang Jin Can,
	linux-usb, linux-kernel

In (e583d9d USB: global suspend and remote wakeup don't mix) we
introduced wakeup_enabled_descendants() as a static function.  We'd
like to use this function in USB controller drivers to know if we
should keep the controller on during suspend time, since doing so has
a power impact.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
 drivers/usb/core/hub.c  | 7 ++++---
 include/linux/usb/hcd.h | 5 +++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 43cb2f2..fdc59db 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3034,13 +3034,14 @@ static int usb_disable_remote_wakeup(struct usb_device *udev)
 }
 
 /* Count of wakeup-enabled devices at or below udev */
-static unsigned wakeup_enabled_descendants(struct usb_device *udev)
+unsigned usb_wakeup_enabled_descendants(struct usb_device *udev)
 {
 	struct usb_hub *hub = usb_hub_to_struct_hub(udev);
 
 	return udev->do_remote_wakeup +
 			(hub ? hub->wakeup_enabled_descendants : 0);
 }
+EXPORT_SYMBOL_GPL(usb_wakeup_enabled_descendants);
 
 /*
  * usb_port_suspend - suspend a usb device's upstream port
@@ -3149,7 +3150,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
 	 * Therefore we will turn on the suspend feature if udev or any of its
 	 * descendants is enabled for remote wakeup.
 	 */
-	else if (PMSG_IS_AUTO(msg) || wakeup_enabled_descendants(udev) > 0)
+	else if (PMSG_IS_AUTO(msg) || usb_wakeup_enabled_descendants(udev) > 0)
 		status = set_port_feature(hub->hdev, port1,
 				USB_PORT_FEAT_SUSPEND);
 	else {
@@ -3548,7 +3549,7 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
 		}
 		if (udev)
 			hub->wakeup_enabled_descendants +=
-					wakeup_enabled_descendants(udev);
+					usb_wakeup_enabled_descendants(udev);
 	}
 
 	if (hdev->do_remote_wakeup && hub->quirk_check_port_auto_suspend) {
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index c9aa779..30d74c9 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -626,11 +626,16 @@ extern wait_queue_head_t usb_kill_urb_queue;
 #define usb_endpoint_out(ep_dir)	(!((ep_dir) & USB_DIR_IN))
 
 #ifdef CONFIG_PM
+extern unsigned usb_wakeup_enabled_descendants(struct usb_device *udev);
 extern void usb_root_hub_lost_power(struct usb_device *rhdev);
 extern int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg);
 extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg);
 extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd);
 #else
+static inline unsigned usb_wakeup_enabled_descendants(struct usb_device *udev)
+{
+	return 0;
+}
 static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd)
 {
 	return;
-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 1/3] USB: Export usb_wakeup_enabled_descendants()
@ 2015-06-22 23:52   ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Robert Schlabbach, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	Heiko Stuebner, Andrew Bresticker, Pratyush Anand,
	Matthew Garrett, Douglas Anderson, Petr Mladek,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Alan Stern,
	lyz-TNX95d0MmH7DzftRWevZcw, Peter Chen, Chris Zhong,
	Julius Werner, Dan Williams, Zhuang Jin Can, Alexandru Stan

In (e583d9d USB: global suspend and remote wakeup don't mix) we
introduced wakeup_enabled_descendants() as a static function.  We'd
like to use this function in USB controller drivers to know if we
should keep the controller on during suspend time, since doing so has
a power impact.

Signed-off-by: Douglas Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/usb/core/hub.c  | 7 ++++---
 include/linux/usb/hcd.h | 5 +++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 43cb2f2..fdc59db 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3034,13 +3034,14 @@ static int usb_disable_remote_wakeup(struct usb_device *udev)
 }
 
 /* Count of wakeup-enabled devices at or below udev */
-static unsigned wakeup_enabled_descendants(struct usb_device *udev)
+unsigned usb_wakeup_enabled_descendants(struct usb_device *udev)
 {
 	struct usb_hub *hub = usb_hub_to_struct_hub(udev);
 
 	return udev->do_remote_wakeup +
 			(hub ? hub->wakeup_enabled_descendants : 0);
 }
+EXPORT_SYMBOL_GPL(usb_wakeup_enabled_descendants);
 
 /*
  * usb_port_suspend - suspend a usb device's upstream port
@@ -3149,7 +3150,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
 	 * Therefore we will turn on the suspend feature if udev or any of its
 	 * descendants is enabled for remote wakeup.
 	 */
-	else if (PMSG_IS_AUTO(msg) || wakeup_enabled_descendants(udev) > 0)
+	else if (PMSG_IS_AUTO(msg) || usb_wakeup_enabled_descendants(udev) > 0)
 		status = set_port_feature(hub->hdev, port1,
 				USB_PORT_FEAT_SUSPEND);
 	else {
@@ -3548,7 +3549,7 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
 		}
 		if (udev)
 			hub->wakeup_enabled_descendants +=
-					wakeup_enabled_descendants(udev);
+					usb_wakeup_enabled_descendants(udev);
 	}
 
 	if (hdev->do_remote_wakeup && hub->quirk_check_port_auto_suspend) {
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index c9aa779..30d74c9 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -626,11 +626,16 @@ extern wait_queue_head_t usb_kill_urb_queue;
 #define usb_endpoint_out(ep_dir)	(!((ep_dir) & USB_DIR_IN))
 
 #ifdef CONFIG_PM
+extern unsigned usb_wakeup_enabled_descendants(struct usb_device *udev);
 extern void usb_root_hub_lost_power(struct usb_device *rhdev);
 extern int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg);
 extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg);
 extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd);
 #else
+static inline unsigned usb_wakeup_enabled_descendants(struct usb_device *udev)
+{
+	return 0;
+}
 static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd)
 {
 	return;
-- 
2.4.3.573.g4eafbef

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
@ 2015-06-22 23:52   ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz, linux-rockchip, Douglas Anderson,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Kever Yang, Paul Zimmerman, Gregory Herrero, devicetree,
	linux-kernel

Some SoCs with a dwc2 USB controller may need to keep the PHY on to
support remote wakeup.  Allow specifying this as a device tree
property.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
 Documentation/devicetree/bindings/usb/dwc2.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index fd132cb..84d258d 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -17,6 +17,9 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties
 Optional properties:
 - phys: phy provider specifier
 - phy-names: shall be "usb2-phy"
+- snps,need-phy-for-wake: if present indicates that the phy needs to be left
+  on for remote wakeup during suspend.
+
 Refer to phy/phy-bindings.txt for generic phy consumer properties
 - dr_mode: shall be one of "host", "peripheral" and "otg"
   Refer to usb/generic.txt
@@ -35,4 +38,5 @@ Example:
 		clock-names = "otg";
 		phys = <&usbphy>;
 		phy-names = "usb2-phy";
+		snps,need-phy-for-wake;
         };
-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
@ 2015-06-22 23:52   ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz-TNX95d0MmH7DzftRWevZcw,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Douglas Anderson, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kever Yang, Paul Zimmerman,
	Gregory Herrero, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Some SoCs with a dwc2 USB controller may need to keep the PHY on to
support remote wakeup.  Allow specifying this as a device tree
property.

Signed-off-by: Douglas Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 Documentation/devicetree/bindings/usb/dwc2.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index fd132cb..84d258d 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -17,6 +17,9 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties
 Optional properties:
 - phys: phy provider specifier
 - phy-names: shall be "usb2-phy"
+- snps,need-phy-for-wake: if present indicates that the phy needs to be left
+  on for remote wakeup during suspend.
+
 Refer to phy/phy-bindings.txt for generic phy consumer properties
 - dr_mode: shall be one of "host", "peripheral" and "otg"
   Refer to usb/generic.txt
@@ -35,4 +38,5 @@ Example:
 		clock-names = "otg";
 		phys = <&usbphy>;
 		phy-names = "usb2-phy";
+		snps,need-phy-for-wake;
         };
-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled
@ 2015-06-22 23:52   ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz, linux-rockchip, Douglas Anderson, linux-usb,
	linux-kernel

If the 'snps,need-phy-for-wake' is set in the device tree then:

- We know that we can wakeup, so call device_set_wakeup_capable().
  The USB core will use this knowledge to enable wakeup by default.
- We know that we should keep the PHY on during suspend if something
  on our root hub needs remote wakeup.  This requires the patch (USB:
  Export usb_wakeup_enabled_descendants()).  Note that we don't keep
  the PHY on at suspend time if it's not needed because it would be a
  power draw.

If we later find some users of dwc2 that can support wakeup without
keeping the PHY on we may want to add a way to call
device_set_wakeup_capable() without keeping the PHY on at suspend
time.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
 drivers/usb/dwc2/core.h     |  2 ++
 drivers/usb/dwc2/platform.c | 45 +++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 53b8de0..b60a1e8 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -687,6 +687,8 @@ struct dwc2_hsotg {
 	enum usb_dr_mode dr_mode;
 	unsigned int hcd_enabled:1;
 	unsigned int gadget_enabled:1;
+	unsigned int need_phy_for_wake:1;
+	unsigned int phy_off_for_suspend:1;
 
 	struct phy *phy;
 	struct usb_phy *uphy;
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index 9093530..38fce75 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -42,7 +42,9 @@
 #include <linux/of_device.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/usb.h>
 
+#include <linux/usb/hcd.h>
 #include <linux/usb/of.h>
 
 #include "core.h"
@@ -222,6 +224,10 @@ static int dwc2_driver_probe(struct platform_device *dev)
 
 	hsotg->dr_mode = of_usb_get_dr_mode(dev->dev.of_node);
 
+	hsotg->need_phy_for_wake =
+		of_property_read_bool(dev->dev.of_node,
+				      "snps,need-phy-for-wake");
+
 	/*
 	 * Attempt to find a generic PHY, then look for an old style
 	 * USB PHY
@@ -265,6 +271,14 @@ static int dwc2_driver_probe(struct platform_device *dev)
 		hsotg->gadget_enabled = 1;
 	}
 
+	/*
+	 * If we need PHY for wakeup we must be wakeup capable.
+	 * When we have a device that can wake without the PHY we
+	 * can adjust this condition.
+	 */
+	if (hsotg->need_phy_for_wake)
+		device_set_wakeup_capable(&dev->dev, true);
+
 	if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) {
 		retval = dwc2_hcd_init(hsotg, irq);
 		if (retval) {
@@ -282,6 +296,28 @@ static int dwc2_driver_probe(struct platform_device *dev)
 	return retval;
 }
 
+static bool __maybe_unused dwc2_can_poweroff_phy(struct dwc2_hsotg *dwc2)
+{
+	struct usb_device *root_hub = dwc2_hsotg_to_hcd(dwc2)->self.root_hub;
+
+	if (dwc2->lx_state == DWC2_L0)
+		return false;
+
+	/* If the controller isn't allowed to wakeup then we can power off. */
+	if (!device_may_wakeup(dwc2->dev))
+		return true;
+
+	/*
+	 * We don't want to power off the PHY if something under the
+	 * root hub has wakeup enabled.
+	 */
+	if (usb_wakeup_enabled_descendants(root_hub))
+		return false;
+
+	/* No reason to keep the PHY powered, so allow poweroff */
+	return true;
+}
+
 static int __maybe_unused dwc2_suspend(struct device *dev)
 {
 	struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
@@ -290,8 +326,10 @@ static int __maybe_unused dwc2_suspend(struct device *dev)
 	if (dwc2_is_device_mode(dwc2)) {
 		ret = s3c_hsotg_suspend(dwc2);
 	} else {
-		if (dwc2->lx_state == DWC2_L0)
+		if (!dwc2_can_poweroff_phy(dwc2))
 			return 0;
+
+		dwc2->phy_off_for_suspend = true;
 		phy_exit(dwc2->phy);
 		phy_power_off(dwc2->phy);
 
@@ -307,9 +345,12 @@ static int __maybe_unused dwc2_resume(struct device *dev)
 	if (dwc2_is_device_mode(dwc2)) {
 		ret = s3c_hsotg_resume(dwc2);
 	} else {
+		if (!dwc2->phy_off_for_suspend)
+			return ret;
+
 		phy_power_on(dwc2->phy);
 		phy_init(dwc2->phy);
-
+		dwc2->phy_off_for_suspend = false;
 	}
 	return ret;
 }
-- 
2.4.3.573.g4eafbef

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled
@ 2015-06-22 23:52   ` Douglas Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas Anderson @ 2015-06-22 23:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman, John Youn, Felipe Balbi
  Cc: Chris Zhong, Heiko Stuebner, Julius Werner, Andrew Bresticker,
	Alexandru Stan, lyz-TNX95d0MmH7DzftRWevZcw,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Douglas Anderson, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

If the 'snps,need-phy-for-wake' is set in the device tree then:

- We know that we can wakeup, so call device_set_wakeup_capable().
  The USB core will use this knowledge to enable wakeup by default.
- We know that we should keep the PHY on during suspend if something
  on our root hub needs remote wakeup.  This requires the patch (USB:
  Export usb_wakeup_enabled_descendants()).  Note that we don't keep
  the PHY on at suspend time if it's not needed because it would be a
  power draw.

If we later find some users of dwc2 that can support wakeup without
keeping the PHY on we may want to add a way to call
device_set_wakeup_capable() without keeping the PHY on at suspend
time.

Signed-off-by: Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Signed-off-by: Douglas Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/usb/dwc2/core.h     |  2 ++
 drivers/usb/dwc2/platform.c | 45 +++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 53b8de0..b60a1e8 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -687,6 +687,8 @@ struct dwc2_hsotg {
 	enum usb_dr_mode dr_mode;
 	unsigned int hcd_enabled:1;
 	unsigned int gadget_enabled:1;
+	unsigned int need_phy_for_wake:1;
+	unsigned int phy_off_for_suspend:1;
 
 	struct phy *phy;
 	struct usb_phy *uphy;
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
index 9093530..38fce75 100644
--- a/drivers/usb/dwc2/platform.c
+++ b/drivers/usb/dwc2/platform.c
@@ -42,7 +42,9 @@
 #include <linux/of_device.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/usb.h>
 
+#include <linux/usb/hcd.h>
 #include <linux/usb/of.h>
 
 #include "core.h"
@@ -222,6 +224,10 @@ static int dwc2_driver_probe(struct platform_device *dev)
 
 	hsotg->dr_mode = of_usb_get_dr_mode(dev->dev.of_node);
 
+	hsotg->need_phy_for_wake =
+		of_property_read_bool(dev->dev.of_node,
+				      "snps,need-phy-for-wake");
+
 	/*
 	 * Attempt to find a generic PHY, then look for an old style
 	 * USB PHY
@@ -265,6 +271,14 @@ static int dwc2_driver_probe(struct platform_device *dev)
 		hsotg->gadget_enabled = 1;
 	}
 
+	/*
+	 * If we need PHY for wakeup we must be wakeup capable.
+	 * When we have a device that can wake without the PHY we
+	 * can adjust this condition.
+	 */
+	if (hsotg->need_phy_for_wake)
+		device_set_wakeup_capable(&dev->dev, true);
+
 	if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) {
 		retval = dwc2_hcd_init(hsotg, irq);
 		if (retval) {
@@ -282,6 +296,28 @@ static int dwc2_driver_probe(struct platform_device *dev)
 	return retval;
 }
 
+static bool __maybe_unused dwc2_can_poweroff_phy(struct dwc2_hsotg *dwc2)
+{
+	struct usb_device *root_hub = dwc2_hsotg_to_hcd(dwc2)->self.root_hub;
+
+	if (dwc2->lx_state == DWC2_L0)
+		return false;
+
+	/* If the controller isn't allowed to wakeup then we can power off. */
+	if (!device_may_wakeup(dwc2->dev))
+		return true;
+
+	/*
+	 * We don't want to power off the PHY if something under the
+	 * root hub has wakeup enabled.
+	 */
+	if (usb_wakeup_enabled_descendants(root_hub))
+		return false;
+
+	/* No reason to keep the PHY powered, so allow poweroff */
+	return true;
+}
+
 static int __maybe_unused dwc2_suspend(struct device *dev)
 {
 	struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
@@ -290,8 +326,10 @@ static int __maybe_unused dwc2_suspend(struct device *dev)
 	if (dwc2_is_device_mode(dwc2)) {
 		ret = s3c_hsotg_suspend(dwc2);
 	} else {
-		if (dwc2->lx_state == DWC2_L0)
+		if (!dwc2_can_poweroff_phy(dwc2))
 			return 0;
+
+		dwc2->phy_off_for_suspend = true;
 		phy_exit(dwc2->phy);
 		phy_power_off(dwc2->phy);
 
@@ -307,9 +345,12 @@ static int __maybe_unused dwc2_resume(struct device *dev)
 	if (dwc2_is_device_mode(dwc2)) {
 		ret = s3c_hsotg_resume(dwc2);
 	} else {
+		if (!dwc2->phy_off_for_suspend)
+			return ret;
+
 		phy_power_on(dwc2->phy);
 		phy_init(dwc2->phy);

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
  2015-06-22 23:52   ` Douglas Anderson
  (?)
@ 2015-06-23 14:17   ` Rob Herring
  2015-06-23 15:12       ` Doug Anderson
  -1 siblings, 1 reply; 17+ messages in thread
From: Rob Herring @ 2015-06-23 14:17 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Greg Kroah-Hartman, John Youn, Felipe Balbi, Chris Zhong,
	Heiko Stuebner, Julius Werner, Andrew Bresticker, Alexandru Stan,
	lyz, linux-rockchip, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kever Yang, Paul Zimmerman,
	Gregory Herrero, devicetree, linux-kernel

On Mon, Jun 22, 2015 at 6:52 PM, Douglas Anderson <dianders@chromium.org> wrote:
> Some SoCs with a dwc2 USB controller may need to keep the PHY on to
> support remote wakeup.  Allow specifying this as a device tree
> property.

I find it hard to believe that any host can support wake-up without
the PHY. Does this really need to be conditional? Perhaps other cases
are just always-on or remote wake-up has not been tested.

Assuming the PHY was provided with the knowledge that remote wakeup is
enabled, it would be able to figure out within its driver how to
support that. Unfortunately the generic PHY framework is a completely
lacking in its ability to support protocol specific features like this
or other USB PHY features like Vbus detect or charger detection.

Rob

>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
> index fd132cb..84d258d 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
> @@ -17,6 +17,9 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties
>  Optional properties:
>  - phys: phy provider specifier
>  - phy-names: shall be "usb2-phy"
> +- snps,need-phy-for-wake: if present indicates that the phy needs to be left
> +  on for remote wakeup during suspend.
> +
>  Refer to phy/phy-bindings.txt for generic phy consumer properties
>  - dr_mode: shall be one of "host", "peripheral" and "otg"
>    Refer to usb/generic.txt
> @@ -35,4 +38,5 @@ Example:
>                 clock-names = "otg";
>                 phys = <&usbphy>;
>                 phy-names = "usb2-phy";
> +               snps,need-phy-for-wake;
>          };
> --
> 2.4.3.573.g4eafbef
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
@ 2015-06-23 15:12       ` Doug Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Doug Anderson @ 2015-06-23 15:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Greg Kroah-Hartman, John Youn, Felipe Balbi, Chris Zhong,
	Heiko Stuebner, Julius Werner, Andrew Bresticker, Alexandru Stan,
	lyz, open list:ARM/Rockchip SoC...,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Kever Yang, Paul Zimmerman, Gregory Herrero, devicetree,
	linux-kernel

Rob,

On Tue, Jun 23, 2015 at 7:17 AM, Rob Herring <robherring2@gmail.com> wrote:
> On Mon, Jun 22, 2015 at 6:52 PM, Douglas Anderson <dianders@chromium.org> wrote:
>> Some SoCs with a dwc2 USB controller may need to keep the PHY on to
>> support remote wakeup.  Allow specifying this as a device tree
>> property.
>
> I find it hard to believe that any host can support wake-up without
> the PHY.

I am told by Andrew Bresticker that on tegra there is complicated
logic in the PMU that allows USB wakeup while powering off the PHY.
If I hadn't been aware of such a feature I probably would have called
the property "wakeup-supported" or something like that.

> Does this really need to be conditional? Perhaps other cases
> are just always-on or remote wake-up has not been tested.

When I worked on exynos products I was told by Samsung that USB wakeup
was simply not possible.  True that they have a different USB
controller, but I can certainly believe that someone could design a
system with dwc2 where USB wakeup was not possible.

Specifically, in order to get USB wakeup we had to switch on the 24MHz
clock at suspend time.  Had that not been possible (or had the 24MHz
clock not been able to be a clock source for the USB controller) then
USB wakeup would not be possible on rk3288 even if we left the phy on.

So to me the three states are:
1. USB wake not possible
2. USB wake possible, don't need PHY
3. USB wake possible, do need PHY

I don't know of any dwc2 users that are in #2 (so I didn't add a
property now), but I figure that when they exist someone should add a
property then.


-Doug

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
@ 2015-06-23 15:12       ` Doug Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Doug Anderson @ 2015-06-23 15:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Greg Kroah-Hartman, John Youn, Felipe Balbi, Chris Zhong,
	Heiko Stuebner, Julius Werner, Andrew Bresticker, Alexandru Stan,
	lyz, open list:ARM/Rockchip SoC...,
	Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Kever Yang, Paul Zimmerman, Gregory Herrero,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Rob,

On Tue, Jun 23, 2015 at 7:17 AM, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Mon, Jun 22, 2015 at 6:52 PM, Douglas Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
>> Some SoCs with a dwc2 USB controller may need to keep the PHY on to
>> support remote wakeup.  Allow specifying this as a device tree
>> property.
>
> I find it hard to believe that any host can support wake-up without
> the PHY.

I am told by Andrew Bresticker that on tegra there is complicated
logic in the PMU that allows USB wakeup while powering off the PHY.
If I hadn't been aware of such a feature I probably would have called
the property "wakeup-supported" or something like that.

> Does this really need to be conditional? Perhaps other cases
> are just always-on or remote wake-up has not been tested.

When I worked on exynos products I was told by Samsung that USB wakeup
was simply not possible.  True that they have a different USB
controller, but I can certainly believe that someone could design a
system with dwc2 where USB wakeup was not possible.

Specifically, in order to get USB wakeup we had to switch on the 24MHz
clock at suspend time.  Had that not been possible (or had the 24MHz
clock not been able to be a clock source for the USB controller) then
USB wakeup would not be possible on rk3288 even if we left the phy on.

So to me the three states are:
1. USB wake not possible
2. USB wake possible, don't need PHY
3. USB wake possible, do need PHY

I don't know of any dwc2 users that are in #2 (so I didn't add a
property now), but I figure that when they exist someone should add a
property then.


-Doug
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-07-06 17:48   ` Felipe Balbi
  0 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2015-07-06 17:48 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Greg Kroah-Hartman, John Youn, Felipe Balbi, Chris Zhong,
	Heiko Stuebner, Julius Werner, Andrew Bresticker, Alexandru Stan,
	lyz, linux-rockchip, Petr Mladek, Alan Stern, Kumar Gala,
	Ian Campbell, Rob Herring, Pratyush Anand, Peter Chen,
	Kever Yang, Pawel Moll, Robert Schlabbach, Gregory Herrero,
	Zhuang Jin Can, devicetree, Dan Williams, Paul Zimmerman,
	linux-usb, linux-kernel, Matthew Garrett, Mark Rutland

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

On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote:
> This series of patches, together with
> <https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
> dts change allow us to wake up from a USB device on rk3288 boards.
> The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
> The chromeos-3.14 kernel tested included a full set of dwc2 backports
> from upstream, so this is expected to function upstream once we get
> everything setup there.
> 
> 
> Douglas Anderson (3):
>   USB: Export usb_wakeup_enabled_descendants()
>   Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB

I didn't get 2/3 :-(

-- 
balbi

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-07-06 17:48   ` Felipe Balbi
  0 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2015-07-06 17:48 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Mark Rutland, Heiko Stuebner, Andrew Bresticker, Kever Yang,
	Petr Mladek, Chris Zhong, Pratyush Anand,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Alan Stern,
	lyz-TNX95d0MmH7DzftRWevZcw, Peter Chen,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Alexandru Stan, Pawel Moll,
	Ian Campbell, John Youn, Rob Herring, Matthew Garrett,
	Robert Schlabbach, Dan Williams, Zhuang Jin Can, Gregory Herrero,
	Greg Kroah-Hartman, linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 687 bytes --]

On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote:
> This series of patches, together with
> <https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
> dts change allow us to wake up from a USB device on rk3288 boards.
> The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
> The chromeos-3.14 kernel tested included a full set of dwc2 backports
> from upstream, so this is expected to function upstream once we get
> everything setup there.
> 
> 
> Douglas Anderson (3):
>   USB: Export usb_wakeup_enabled_descendants()
>   Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB

I didn't get 2/3 :-(

-- 
balbi

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

[-- Attachment #2: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
  2015-07-06 17:48   ` Felipe Balbi
@ 2015-07-06 18:06     ` Doug Anderson
  -1 siblings, 0 replies; 17+ messages in thread
From: Doug Anderson @ 2015-07-06 18:06 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, John Youn, Chris Zhong, Heiko Stuebner,
	Julius Werner, Andrew Bresticker, Alexandru Stan, lyz,
	open list:ARM/Rockchip SoC...,
	Petr Mladek, Alan Stern, Kumar Gala, Ian Campbell, Rob Herring,
	Pratyush Anand, Peter Chen, Kever Yang, Pawel Moll,
	Robert Schlabbach, Gregory Herrero, Zhuang Jin Can, devicetree,
	Dan Williams, Paul Zimmerman, linux-usb, linux-kernel,
	Matthew Garrett, Mark Rutland

Felipe,

On Mon, Jul 6, 2015 at 10:48 AM, Felipe Balbi <balbi@ti.com> wrote:
> On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote:
>> This series of patches, together with
>> <https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
>> dts change allow us to wake up from a USB device on rk3288 boards.
>> The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
>> The chromeos-3.14 kernel tested included a full set of dwc2 backports
>> from upstream, so this is expected to function upstream once we get
>> everything setup there.
>>
>>
>> Douglas Anderson (3):
>>   USB: Export usb_wakeup_enabled_descendants()
>>   Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
>
> I didn't get 2/3 :-(

Odd.  I'm happy to repost the series, but you were certainly on the
"To" for the whole series.  You can see the Headers at
<https://patchwork.kernel.org/patch/6658421/>

...please let me know if you'd like me to repost and we can hope the
email system works better next time...

-Doug

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-07-06 18:06     ` Doug Anderson
  0 siblings, 0 replies; 17+ messages in thread
From: Doug Anderson @ 2015-07-06 18:06 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Greg Kroah-Hartman, John Youn, Chris Zhong, Heiko Stuebner,
	Julius Werner, Andrew Bresticker, Alexandru Stan, lyz,
	open list:ARM/Rockchip SoC...,
	Petr Mladek, Alan Stern, Kumar Gala, Ian Campbell, Rob Herring,
	Pratyush Anand, Peter Chen, Kever Yang, Pawel Moll,
	Robert Schlabbach, Gregory Herrero, Zhuang Jin Can

Felipe,

On Mon, Jul 6, 2015 at 10:48 AM, Felipe Balbi <balbi@ti.com> wrote:
> On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote:
>> This series of patches, together with
>> <https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
>> dts change allow us to wake up from a USB device on rk3288 boards.
>> The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
>> The chromeos-3.14 kernel tested included a full set of dwc2 backports
>> from upstream, so this is expected to function upstream once we get
>> everything setup there.
>>
>>
>> Douglas Anderson (3):
>>   USB: Export usb_wakeup_enabled_descendants()
>>   Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
>
> I didn't get 2/3 :-(

Odd.  I'm happy to repost the series, but you were certainly on the
"To" for the whole series.  You can see the Headers at
<https://patchwork.kernel.org/patch/6658421/>

...please let me know if you'd like me to repost and we can hope the
email system works better next time...

-Doug

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-07-06 18:12       ` Felipe Balbi
  0 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2015-07-06 18:12 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Felipe Balbi, Greg Kroah-Hartman, John Youn, Chris Zhong,
	Heiko Stuebner, Julius Werner, Andrew Bresticker, Alexandru Stan,
	lyz, open list:ARM/Rockchip SoC...,
	Petr Mladek, Alan Stern, Kumar Gala, Ian Campbell, Rob Herring,
	Pratyush Anand, Peter Chen, Kever Yang, Pawel Moll,
	Robert Schlabbach, Gregory Herrero, Zhuang Jin Can, devicetree,
	Dan Williams, linux-usb, linux-kernel, Matthew Garrett,
	Mark Rutland

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

On Mon, Jul 06, 2015 at 11:06:35AM -0700, Doug Anderson wrote:
> Felipe,
> 
> On Mon, Jul 6, 2015 at 10:48 AM, Felipe Balbi <balbi@ti.com> wrote:
> > On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote:
> >> This series of patches, together with
> >> <https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
> >> dts change allow us to wake up from a USB device on rk3288 boards.
> >> The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
> >> The chromeos-3.14 kernel tested included a full set of dwc2 backports
> >> from upstream, so this is expected to function upstream once we get
> >> everything setup there.
> >>
> >>
> >> Douglas Anderson (3):
> >>   USB: Export usb_wakeup_enabled_descendants()
> >>   Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
> >
> > I didn't get 2/3 :-(
> 
> Odd.  I'm happy to repost the series, but you were certainly on the
> "To" for the whole series.  You can see the Headers at
> <https://patchwork.kernel.org/patch/6658421/>
> 
> ...please let me know if you'd like me to repost and we can hope the
> email system works better next time...

If you can, that would help me. Just make sure to Cc linux-usb on all
patches, since that's where I tend to get my patches from.

Thanks and sorry for the extra step resending this.

ps: dropping Paul Z as he's not in SNPS anymore

-- 
balbi

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288
@ 2015-07-06 18:12       ` Felipe Balbi
  0 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2015-07-06 18:12 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Mark Rutland, Heiko Stuebner, Andrew Bresticker, Kever Yang,
	Petr Mladek, Chris Zhong, Pratyush Anand,
	open list:ARM/Rockchip SoC...,
	Alan Stern, lyz, Peter Chen, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Alexandru Stan, Pawel Moll, Ian Campbell, John Youn, Rob Herring,
	Matthew Garrett, Robert Schlabbach, Dan Williams, Zhuang Jin Can,
	Gregory Herrero


[-- Attachment #1.1: Type: text/plain, Size: 1443 bytes --]

On Mon, Jul 06, 2015 at 11:06:35AM -0700, Doug Anderson wrote:
> Felipe,
> 
> On Mon, Jul 6, 2015 at 10:48 AM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote:
> > On Mon, Jun 22, 2015 at 04:52:21PM -0700, Douglas Anderson wrote:
> >> This series of patches, together with
> >> <https://patchwork.kernel.org/patch/6652341/> from Chris Zhong and a
> >> dts change allow us to wake up from a USB device on rk3288 boards.
> >> The patches were tested on rk3288-jerry in the chromeos-3.14 kernel.
> >> The chromeos-3.14 kernel tested included a full set of dwc2 backports
> >> from upstream, so this is expected to function upstream once we get
> >> everything setup there.
> >>
> >>
> >> Douglas Anderson (3):
> >>   USB: Export usb_wakeup_enabled_descendants()
> >>   Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB
> >
> > I didn't get 2/3 :-(
> 
> Odd.  I'm happy to repost the series, but you were certainly on the
> "To" for the whole series.  You can see the Headers at
> <https://patchwork.kernel.org/patch/6658421/>
> 
> ...please let me know if you'd like me to repost and we can hope the
> email system works better next time...

If you can, that would help me. Just make sure to Cc linux-usb on all
patches, since that's where I tend to get my patches from.

Thanks and sorry for the extra step resending this.

ps: dropping Paul Z as he's not in SNPS anymore

-- 
balbi

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

[-- Attachment #2: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-07-06 18:14 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 23:52 [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288 Douglas Anderson
2015-06-22 23:52 ` Douglas Anderson
2015-06-22 23:52 ` [PATCH 1/3] USB: Export usb_wakeup_enabled_descendants() Douglas Anderson
2015-06-22 23:52   ` Douglas Anderson
2015-06-22 23:52 ` [PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB Douglas Anderson
2015-06-22 23:52   ` Douglas Anderson
2015-06-23 14:17   ` Rob Herring
2015-06-23 15:12     ` Doug Anderson
2015-06-23 15:12       ` Doug Anderson
2015-06-22 23:52 ` [PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled Douglas Anderson
2015-06-22 23:52   ` Douglas Anderson
2015-07-06 17:48 ` [PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288 Felipe Balbi
2015-07-06 17:48   ` Felipe Balbi
2015-07-06 18:06   ` Doug Anderson
2015-07-06 18:06     ` Doug Anderson
2015-07-06 18:12     ` Felipe Balbi
2015-07-06 18:12       ` 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.