[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1465465471-28740-13-git-send-email-k.kozlowski@samsung.com>
Date: Thu, 09 Jun 2016 11:44:29 +0200
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: Ulf Hansson <ulf.hansson@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans de Goede <hdegoede@...hat.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Tomi Valkeinen <tomi.valkeinen@...com>,
Heiko Stuebner <heiko@...ech.de>, linux-mmc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-pm@...r.kernel.org,
linux-usb@...r.kernel.org, linux-fbdev@...r.kernel.org,
hzpeterchen@...il.com
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: [RFC v4 12/14] EXAMPLE CODE: usb: hub: Power sequence the ports on
activation
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@...sung.com>
---
drivers/usb/core/hub.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index c421745b84aa..46d9f9aedacc 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>
@@ -1663,6 +1664,15 @@ 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;
--
1.9.1
Powered by blists - more mailing lists