From: Greg Kroah-Hartman Date: Wed, 3 Jun 2015 05:13:41 +0000 (+0900) Subject: Merge tag 'phy-for-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon... X-Git-Tag: v4.2-rc1~86^2~14 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b3d424e3dcbb5eba572baae30e1052b2fff7b51e;p=karo-tx-linux.git Merge tag 'phy-for-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.2 merge window *) new Broadcom SATA3 PHY driver for Broadcom STB SoCs *) new phy API to get PHY by index which is used in EHCI and OHCI controller drivers *) support specifying supply at port level used for multi-port PHYs *) sparse warning fixes in miphy PHYs *) fix pm_runtime issues in twl4030 driver Signed-off-by: Kishon Vijay Abraham I --- b3d424e3dcbb5eba572baae30e1052b2fff7b51e diff --cc drivers/phy/Kconfig index fceac96c2a31,36788b6f0220..56e1b7585d27 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@@ -309,11 -309,13 +309,20 @@@ config PHY_QCOM_UF help Support for UFS PHY on QCOM chipsets. +config PHY_TUSB1210 + tristate "TI TUSB1210 ULPI PHY module" + depends on USB_ULPI_BUS + select GENERIC_PHY + help + Support for TI TUSB1210 USB ULPI PHY. + + config PHY_BRCMSTB_SATA + tristate "Broadcom STB SATA PHY driver" + depends on ARCH_BRCMSTB + depends on OF + select GENERIC_PHY + help + Enable this to support the SATA3 PHY on 28nm Broadcom STB SoCs. + Likely useful only with CONFIG_SATA_BRCMSTB enabled. + endmenu diff --cc drivers/phy/Makefile index 0a2041803135,c61f3fdd191e..bc92b427e5ca --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile @@@ -40,4 -40,4 +40,5 @@@ obj-$(CONFIG_PHY_STIH41X_USB) += phy-s obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs.o obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-20nm.o obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-14nm.o +obj-$(CONFIG_PHY_TUSB1210) += phy-tusb1210.o + obj-$(CONFIG_PHY_BRCMSTB_SATA) += phy-brcmstb-sata.o diff --cc drivers/usb/host/ehci-platform.c index ba07f16b13e0,145bf19ec283..2593def13cea --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@@ -202,42 -195,24 +195,28 @@@ static int ehci_platform_probe(struct p "needs-reset-on-resume")) pdata->reset_on_resume = 1; + if (of_property_read_bool(dev->dev.of_node, + "has-transaction-translator")) + pdata->has_tt = 1; + priv->num_phys = of_count_phandle_with_args(dev->dev.of_node, "phys", "#phy-cells"); - priv->num_phys = priv->num_phys > 0 ? priv->num_phys : 1; - priv->phys = devm_kcalloc(&dev->dev, priv->num_phys, - sizeof(struct phy *), GFP_KERNEL); - if (!priv->phys) - return -ENOMEM; + if (priv->num_phys > 0) { + priv->phys = devm_kcalloc(&dev->dev, priv->num_phys, + sizeof(struct phy *), GFP_KERNEL); + if (!priv->phys) + return -ENOMEM; + } else + priv->num_phys = 0; for (phy_num = 0; phy_num < priv->num_phys; phy_num++) { - err = of_property_read_string_index( - dev->dev.of_node, - "phy-names", phy_num, - &phy_name); - - if (err < 0) { - if (priv->num_phys > 1) { - dev_err(&dev->dev, "phy-names not provided"); - goto err_put_hcd; - } else - phy_name = "usb"; - } - - priv->phys[phy_num] = devm_phy_get(&dev->dev, - phy_name); - if (IS_ERR(priv->phys[phy_num])) { - err = PTR_ERR(priv->phys[phy_num]); - if ((priv->num_phys > 1) || - (err == -EPROBE_DEFER)) - goto err_put_hcd; - priv->phys[phy_num] = NULL; - } + priv->phys[phy_num] = devm_of_phy_get_by_index( + &dev->dev, dev->dev.of_node, phy_num); + if (IS_ERR(priv->phys[phy_num])) { + err = PTR_ERR(priv->phys[phy_num]); + goto err_put_hcd; + } } for (clk = 0; clk < EHCI_MAX_CLKS; clk++) {