aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2012-11-08 20:44:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 20:44:51 -0500
commitac96511bb5cf92bad97ffc2249f75e45eb70301d (patch)
tree4558028534ad7aa6c508c9485c3435c1cdb8c60c /drivers/usb/otg
parentb76baa8154335a906be85f2b32d6bd1876900133 (diff)
usb: phy: change phy notify connect/disconnect API
The old parameter "port" is useless for phy notify, as one usb phy is only for one usb port. New parameter "speed" stands for the device's speed which is on the port, this "speed" parameter is needed at some platforms which will do some phy operations according to device's speed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Tested-by: Mike Thompson <mpthompson@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r--drivers/usb/otg/mxs-phy.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c
index 5b09f3339ded..9a3caeecc508 100644
--- a/drivers/usb/otg/mxs-phy.c
+++ b/drivers/usb/otg/mxs-phy.c
@@ -76,22 +76,28 @@ static void mxs_phy_shutdown(struct usb_phy *phy)
76 clk_disable_unprepare(mxs_phy->clk); 76 clk_disable_unprepare(mxs_phy->clk);
77} 77}
78 78
79static int mxs_phy_on_connect(struct usb_phy *phy, int port) 79static int mxs_phy_on_connect(struct usb_phy *phy,
80 enum usb_device_speed speed)
80{ 81{
81 dev_dbg(phy->dev, "Connect on port %d\n", port); 82 dev_dbg(phy->dev, "%s speed device has connected\n",
83 (speed == USB_SPEED_HIGH) ? "high" : "non-high");
82 84
83 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, 85 if (speed == USB_SPEED_HIGH)
84 phy->io_priv + HW_USBPHY_CTRL_SET); 86 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
87 phy->io_priv + HW_USBPHY_CTRL_SET);
85 88
86 return 0; 89 return 0;
87} 90}
88 91
89static int mxs_phy_on_disconnect(struct usb_phy *phy, int port) 92static int mxs_phy_on_disconnect(struct usb_phy *phy,
93 enum usb_device_speed speed)
90{ 94{
91 dev_dbg(phy->dev, "Disconnect on port %d\n", port); 95 dev_dbg(phy->dev, "%s speed device has disconnected\n",
96 (speed == USB_SPEED_HIGH) ? "high" : "non-high");
92 97
93 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT, 98 if (speed == USB_SPEED_HIGH)
94 phy->io_priv + HW_USBPHY_CTRL_CLR); 99 writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
100 phy->io_priv + HW_USBPHY_CTRL_CLR);
95 101
96 return 0; 102 return 0;
97} 103}