summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-platform.c
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2018-03-03 22:43:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-09 09:43:52 -0800
commit4e88d4c083016454f179686529ae65d70b933b58 (patch)
tree2f124819d2fb5fe17dbba4e5c1eaabdec72a70a3 /drivers/usb/host/ohci-platform.c
parent05db0dcc70c61bb51d01845e558bd43add5d55bb (diff)
downloadlinux-stable-4e88d4c083016454f179686529ae65d70b933b58.tar.gz
linux-stable-4e88d4c083016454f179686529ae65d70b933b58.tar.bz2
linux-stable-4e88d4c083016454f179686529ae65d70b933b58.zip
usb: add a flag to skip PHY initialization to struct usb_hcd
The USB HCD core driver parses the device-tree node for "phys" and "usb-phys" properties. It also manages the power state of these PHYs automatically. However, drivers may opt-out of this behavior by setting "phy" or "usb_phy" in struct usb_hcd to a non-null value. An example where this is required is the "Qualcomm USB2 controller", implemented by the chipidea driver. The hardware requires that the PHY is only powered on after the "reset completed" event from the controller is received. A follow-up patch will allow the USB HCD core driver to manage more than one PHY. Add a new "skip_phy_initialization" bitflag to struct usb_hcd so drivers can opt-out of any PHY management provided by the USB HCD core driver. This also updates the existing drivers so they use the new flag if they want to opt out of the PHY management provided by the USB HCD core driver. This means that for these drivers the new "multiple PHY" handling (which will be added in a follow-up patch) will be disabled as well. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by: Peter Chen <peter.chen@nxp.com> Tested-by: Neil Armstrong <narmstrong@baylibre.con> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-platform.c')
-rw-r--r--drivers/usb/host/ohci-platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index 1e6c954f4b3f..62ef36a9333f 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -186,9 +186,9 @@ static int ohci_platform_probe(struct platform_device *dev)
if (IS_ERR(priv->phys[phy_num])) {
err = PTR_ERR(priv->phys[phy_num]);
goto err_put_hcd;
- } else if (!hcd->phy) {
+ } else {
/* Avoiding phy_get() in usb_add_hcd() */
- hcd->phy = priv->phys[phy_num];
+ hcd->skip_phy_initialization = 1;
}
}