summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci_hdrc_msm.c
diff options
context:
space:
mode:
authorAntoine Tenart2014-10-30 18:41:16 +0100
committerFelipe Balbi2014-11-03 17:02:50 +0100
commitef44cb4226d132146e44f8ea562a16b27ff61126 (patch)
treecec7cf8bd69f400de0fbdb76e6a43759a154d446 /drivers/usb/chipidea/ci_hdrc_msm.c
parentusb: add support to the generic PHY framework in OTG (diff)
downloadkernel-qcow2-linux-ef44cb4226d132146e44f8ea562a16b27ff61126.tar.gz
kernel-qcow2-linux-ef44cb4226d132146e44f8ea562a16b27ff61126.tar.xz
kernel-qcow2-linux-ef44cb4226d132146e44f8ea562a16b27ff61126.zip
usb: allow to supply the PHY in the drivers when using HCD
This patch modify the generic code handling PHYs to allow them to be supplied from the drivers. This adds checks to ensure no PHY was already there when looking for one in the generic code. This also makes sure we do not modify its state in the generic HCD functions, it was provided by the driver. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/chipidea/ci_hdrc_msm.c')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_msm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
index 4935ac38fd00..3edf969ed797 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -26,15 +26,15 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
dev_dbg(dev, "CI_HDRC_CONTROLLER_RESET_EVENT received\n");
writel(0, USB_AHBBURST);
writel(0, USB_AHBMODE);
- usb_phy_init(ci->transceiver);
+ usb_phy_init(ci->usb_phy);
break;
case CI_HDRC_CONTROLLER_STOPPED_EVENT:
dev_dbg(dev, "CI_HDRC_CONTROLLER_STOPPED_EVENT received\n");
/*
- * Put the transceiver in non-driving mode. Otherwise host
+ * Put the phy in non-driving mode. Otherwise host
* may not detect soft-disconnection.
*/
- usb_phy_notify_disconnect(ci->transceiver, USB_SPEED_UNKNOWN);
+ usb_phy_notify_disconnect(ci->usb_phy, USB_SPEED_UNKNOWN);
break;
default:
dev_dbg(dev, "unknown ci_hdrc event\n");
@@ -68,7 +68,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev)
if (IS_ERR(phy))
return PTR_ERR(phy);
- ci_hdrc_msm_platdata.phy = phy;
+ ci_hdrc_msm_platdata.usb_phy = phy;
plat_ci = ci_hdrc_add_device(&pdev->dev,
pdev->resource, pdev->num_resources,