]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/phy/phy-twl4030-usb.c
Merge tag 'ecryptfs-3.19-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / phy / phy-twl4030-usb.c
index 7b04befd5271e73bdac2ce2947350b758dc1fdfe..8e87f54671f32de11915a7921824fc4a8929ab84 100644 (file)
@@ -606,7 +606,7 @@ static int twl4030_set_peripheral(struct usb_otg *otg,
 
        otg->gadget = gadget;
        if (!gadget)
-               otg->phy->state = OTG_STATE_UNDEFINED;
+               otg->state = OTG_STATE_UNDEFINED;
 
        return 0;
 }
@@ -618,7 +618,7 @@ static int twl4030_set_host(struct usb_otg *otg, struct usb_bus *host)
 
        otg->host = host;
        if (!host)
-               otg->phy->state = OTG_STATE_UNDEFINED;
+               otg->state = OTG_STATE_UNDEFINED;
 
        return 0;
 }
@@ -644,7 +644,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
        struct usb_otg          *otg;
        struct device_node      *np = pdev->dev.of_node;
        struct phy_provider     *phy_provider;
-       struct phy_init_data    *init_data = NULL;
 
        twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL);
        if (!twl)
@@ -655,7 +654,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
                                (enum twl4030_usb_mode *)&twl->usb_mode);
        else if (pdata) {
                twl->usb_mode = pdata->usb_mode;
-               init_data = pdata->init_data;
        } else {
                dev_err(&pdev->dev, "twl4030 initialized without pdata\n");
                return -EINVAL;
@@ -676,11 +674,11 @@ static int twl4030_usb_probe(struct platform_device *pdev)
        twl->phy.otg            = otg;
        twl->phy.type           = USB_PHY_TYPE_USB2;
 
-       otg->phy                = &twl->phy;
+       otg->usb_phy            = &twl->phy;
        otg->set_host           = twl4030_set_host;
        otg->set_peripheral     = twl4030_set_peripheral;
 
-       phy = devm_phy_create(twl->dev, NULL, &ops, init_data);
+       phy = devm_phy_create(twl->dev, NULL, &ops);
        if (IS_ERR(phy)) {
                dev_dbg(&pdev->dev, "Failed to create PHY\n");
                return PTR_ERR(phy);
@@ -733,6 +731,11 @@ static int twl4030_usb_probe(struct platform_device *pdev)
                return status;
        }
 
+       if (pdata)
+               err = phy_create_lookup(phy, "usb", "musb-hdrc.0");
+       if (err)
+               return err;
+
        pm_runtime_mark_last_busy(&pdev->dev);
        pm_runtime_put_autosuspend(twl->dev);