Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1395247
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC v2 10/13] usb: hub: Power sequence the ports on activation |
| Date | 2016-05-05 19:40 +0200 |
| Message-ID | <rvvpL-48v-3@gated-at.bofh.it> (permalink) |
| References | <rvqJs-8s0-15@gated-at.bofh.it> <rvsie-1sf-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, May 05, 2016 at 10:09:47AM -0400, Alan Stern wrote: > On Thu, 5 May 2016, Krzysztof Kozlowski wrote: > > > 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? */ > > It's hard to answer this without knowing what pre-power-on involves. In my particular case, I want to achieve a full reset through regulator (off and on) because the bootloader left it in initialized state. I assume that if bootloader did not configure the device, the reset won't be harmful. In a MMC case, this pre-power-on on is setting the 'reset' GPIO (thus triggering the reset) and post-power-on is clearing the 'reset'. > Why not create a pwrseq_power_on() routine that does pre_power_on > followed by post_power_on? For my purpose it seems sensible. > > > + /* > > + 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); > > This is patch 10/13. hub->ports[i]->pwrseq doesn't get added until > 11/13. Obviously you never tried compiling each patch in the series. Ahh yes, I forgot to reorder them. Thanks for spotting this. > > > + > > hub_activate(hub, HUB_INIT); > > + > > Unnecessary blank line added. Thanks for feedback, Krzysztof
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
[RFC v2 03/13] MAINTAINERS: Retain Ulf Hansson as the same maintainer of pwrseq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 03/13] MAINTAINERS: Retain Ulf Hansson as the same maintainer of pwrseq Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 20:50 +0200
[RFC v2 08/13] usb: hub: Handle deferred probe Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
[RFC v2 09/13] power: pwrseq: Add support for USB hubs with external power Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 09/13] power: pwrseq: Add support for USB hubs with external power Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 22:00 +0200
Re: [RFC v2 09/13] power: pwrseq: Add support for USB hubs with external power Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:30 +0200
[RFC v2 10/13] usb: hub: Power sequence the ports on activation Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 10/13] usb: hub: Power sequence the ports on activation Alan Stern <stern@rowland.harvard.edu> - 2016-05-05 16:20 +0200
Re: [RFC v2 10/13] usb: hub: Power sequence the ports on activation Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 19:40 +0200
Re: [RFC v2 10/13] usb: hub: Power sequence the ports on activation Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 22:00 +0200
[RFC v2 04/13] power: pwrseq: Enable COMPILE_TEST for drivers Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 04/13] power: pwrseq: Enable COMPILE_TEST for drivers Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 21:00 +0200
[RFC v2 06/13] power: pwrseq: Generalize mmc_pwrseq operations by removing mmc prefix Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 06/13] power: pwrseq: Generalize mmc_pwrseq operations by removing mmc prefix Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 21:20 +0200
[RFC v2 12/13] ARM: dts: exynos: Switch the buck8 to GPIO mode on Odroid U3 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
[RFC v2 11/13] usb: port: Parse pwrseq phandle from Device Tree Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 11/13] usb: port: Parse pwrseq phandle from Device Tree Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 22:20 +0200
Re: [RFC v2 11/13] usb: port: Parse pwrseq phandle from Device Tree Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:30 +0200
[RFC v2 13/13] ARM: dts: exynos: Fix LAN and HUB after bootloader initialization on Odroid U3 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 13/13] ARM: dts: exynos: Fix LAN and HUB after bootloader initialization on Odroid U3 Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 22:20 +0200
Re: [RFC v2 13/13] ARM: dts: exynos: Fix LAN and HUB after bootloader initialization on Odroid U3 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:30 +0200
[RFC v2 05/13] power: pwrseq: Remove mmc prefix from mmc_pwrseq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 05/13] power: pwrseq: Remove mmc prefix from mmc_pwrseq Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 21:20 +0200
Re: [RFC v2 05/13] power: pwrseq: Remove mmc prefix from mmc_pwrseq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:30 +0200
[RFC v2 07/13] power: pwrseq: simple: Add support for toggling regulator Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:40 +0200
Re: [RFC v2 07/13] power: pwrseq: simple: Add support for toggling regulator Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 21:40 +0200
Re: [RFC v2 07/13] power: pwrseq: simple: Add support for toggling regulator Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:30 +0200
[RFC v2 02/13] power/mmc: Move pwrseq drivers to power/pwrseq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-05 14:50 +0200
Re: [RFC v2 02/13] power/mmc: Move pwrseq drivers to power/pwrseq Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-05 20:50 +0200
Re: [RFC v2 02/13] power/mmc: Move pwrseq drivers to power/pwrseq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:20 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Rob Herring <robh@kernel.org> - 2016-05-06 00:50 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Peter Chen <hzpeterchen@gmail.com> - 2016-05-06 08:00 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:20 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Peter Chen <hzpeterchen@gmail.com> - 2016-05-06 09:30 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-05-06 08:20 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Rob Herring <robh@kernel.org> - 2016-05-06 15:10 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Ulf Hansson <ulf.hansson@linaro.org> - 2016-05-09 09:50 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Rob Herring <robh@kernel.org> - 2016-05-09 20:20 +0200
Re: [RFC v2 00/13] usb/mmc/power: Fix USB/LAN when TFTP booting Ulf Hansson <ulf.hansson@linaro.org> - 2016-05-10 13:10 +0200
csiph-web