mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
USB fixes for 3.16-rc5
Here are some small USB fixes, PHY driver fixes (they ended up in this tree for lack of somewhere else to put them), and some new USB device ids. Signed-off-by: Greg Kroah-Hartman <[email protected]> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlPBnZAACgkQMUfUDdst+ynTkACgwma2Ccj7DJl3g1zFEtM0h8ki 8RYAnirwiO0p1B7gIKlDIgGs25JIwN61 =tNZ2 -----END PGP SIGNATURE----- Merge tag 'usb-3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes, PHY driver fixes (they ended up in this tree for lack of somewhere else to put them), and some new USB device ids" * tag 'usb-3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove phy: core: Fix error path in phy_create() drivers: phy: phy-samsung-usb2.c: Add missing MODULE_DEVICE_TABLE phy: omap-usb2: fix devm_ioremap_resource error detection code phy: sun4i: depend on RESET_CONTROLLER USB: serial: ftdi_sio: Add Infineon Triboard USB: ftdi_sio: Add extra PID. usb: option: Add ID for Telewell TW-LTE 4G v2 USB: cp210x: add support for Corsair usb dongle
This commit is contained in:
commit
6b458ac195
8 changed files with 28 additions and 9 deletions
|
|
@ -112,6 +112,7 @@ config PHY_EXYNOS5250_SATA
|
|||
config PHY_SUN4I_USB
|
||||
tristate "Allwinner sunxi SoC USB PHY driver"
|
||||
depends on ARCH_SUNXI && HAS_IOMEM && OF
|
||||
depends on RESET_CONTROLLER
|
||||
select GENERIC_PHY
|
||||
help
|
||||
Enable this to support the transceiver that is part of Allwinner
|
||||
|
|
|
|||
|
|
@ -614,8 +614,9 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
|||
return phy;
|
||||
|
||||
put_dev:
|
||||
put_device(&phy->dev);
|
||||
ida_remove(&phy_ida, phy->id);
|
||||
put_device(&phy->dev); /* calls phy_release() which frees resources */
|
||||
return ERR_PTR(ret);
|
||||
|
||||
free_phy:
|
||||
kfree(phy);
|
||||
return ERR_PTR(ret);
|
||||
|
|
@ -799,7 +800,7 @@ static void phy_release(struct device *dev)
|
|||
|
||||
phy = to_phy(dev);
|
||||
dev_vdbg(dev, "releasing '%s'\n", dev_name(dev));
|
||||
ida_remove(&phy_ida, phy->id);
|
||||
ida_simple_remove(&phy_ida, phy->id);
|
||||
kfree(phy);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -233,8 +233,8 @@ static int omap_usb2_probe(struct platform_device *pdev)
|
|||
if (phy_data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) {
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
phy->phy_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (!phy->phy_base)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(phy->phy_base))
|
||||
return PTR_ERR(phy->phy_base);
|
||||
phy->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT;
|
||||
}
|
||||
|
||||
|
|
@ -262,7 +262,6 @@ static int omap_usb2_probe(struct platform_device *pdev)
|
|||
otg->phy = &phy->phy;
|
||||
|
||||
platform_set_drvdata(pdev, phy);
|
||||
pm_runtime_enable(phy->dev);
|
||||
|
||||
generic_phy = devm_phy_create(phy->dev, &ops, NULL);
|
||||
if (IS_ERR(generic_phy))
|
||||
|
|
@ -270,10 +269,13 @@ static int omap_usb2_probe(struct platform_device *pdev)
|
|||
|
||||
phy_set_drvdata(generic_phy, phy);
|
||||
|
||||
pm_runtime_enable(phy->dev);
|
||||
phy_provider = devm_of_phy_provider_register(phy->dev,
|
||||
of_phy_simple_xlate);
|
||||
if (IS_ERR(phy_provider))
|
||||
if (IS_ERR(phy_provider)) {
|
||||
pm_runtime_disable(phy->dev);
|
||||
return PTR_ERR(phy_provider);
|
||||
}
|
||||
|
||||
phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
|
||||
if (IS_ERR(phy->wkupclk)) {
|
||||
|
|
@ -317,6 +319,7 @@ static int omap_usb2_remove(struct platform_device *pdev)
|
|||
if (!IS_ERR(phy->optclk))
|
||||
clk_unprepare(phy->optclk);
|
||||
usb_remove_phy(&phy->phy);
|
||||
pm_runtime_disable(phy->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = {
|
|||
#endif
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, samsung_usb2_phy_of_match);
|
||||
|
||||
static int samsung_usb2_phy_probe(struct platform_device *pdev)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue