lkml.org 
[lkml]   [2016]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC v2 10/13] usb: hub: Power sequence the ports on activation
Date
The autodetection of attached USB device might not work on certain
boards where the power is delivered externally. These devices also might
require a hard reset. Use pwrseq for that in USB hub.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/usb/core/hub.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 1c82fcc448f5..0fddaacc62bf 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -26,6 +26,7 @@
#include <linux/mutex.h>
#include <linux/random.h>
#include <linux/pm_qos.h>
+#include <linux/pwrseq.h>

#include <asm/uaccess.h>
#include <asm/byteorder.h>
@@ -1661,7 +1662,17 @@ static int hub_configure(struct usb_hub *hub,

usb_hub_adjust_deviceremovable(hdev, hub->descriptor);

+ /* FIXME: When do the pre-power-on? */
+ /*
+ for (i = 0; i < maxchild; i++)
+ pwrseq_pre_power_on(hub->ports[i]->pwrseq);
+ */
+
+ for (i = 0; i < maxchild; i++)
+ pwrseq_post_power_on(hub->ports[i]->pwrseq);
+
hub_activate(hub, HUB_INIT);
+
return 0;

fail:
--
1.9.1
\
 
 \ /
  Last update: 2016-05-05 15:01    [W:0.447 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site