]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/otg/mxs-phy.c
usb: phy: change phy notify connect/disconnect API
[karo-tx-linux.git] / drivers / usb / otg / mxs-phy.c
index 5b09f3339ded3abd55d401b6363486b99b193bf8..9a3caeecc508eb10325f370e2051493eb5edee72 100644 (file)
@@ -76,22 +76,28 @@ static void mxs_phy_shutdown(struct usb_phy *phy)
        clk_disable_unprepare(mxs_phy->clk);
 }
 
-static int mxs_phy_on_connect(struct usb_phy *phy, int port)
+static int mxs_phy_on_connect(struct usb_phy *phy,
+               enum usb_device_speed speed)
 {
-       dev_dbg(phy->dev, "Connect on port %d\n", port);
+       dev_dbg(phy->dev, "%s speed device has connected\n",
+               (speed == USB_SPEED_HIGH) ? "high" : "non-high");
 
-       writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
-                       phy->io_priv + HW_USBPHY_CTRL_SET);
+       if (speed == USB_SPEED_HIGH)
+               writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
+                               phy->io_priv + HW_USBPHY_CTRL_SET);
 
        return 0;
 }
 
-static int mxs_phy_on_disconnect(struct usb_phy *phy, int port)
+static int mxs_phy_on_disconnect(struct usb_phy *phy,
+               enum usb_device_speed speed)
 {
-       dev_dbg(phy->dev, "Disconnect on port %d\n", port);
+       dev_dbg(phy->dev, "%s speed device has disconnected\n",
+               (speed == USB_SPEED_HIGH) ? "high" : "non-high");
 
-       writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
-                       phy->io_priv + HW_USBPHY_CTRL_CLR);
+       if (speed == USB_SPEED_HIGH)
+               writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
+                               phy->io_priv + HW_USBPHY_CTRL_CLR);
 
        return 0;
 }