phy: for 4.15 -rc
*) Fix device-tree node lookups in tegra xusb *) Fix platform_get_irq_byname's error checking in cpcap-usb phy driver *) Fix in rockchip-typec phy driver to balance pm_runtime_enable/disable *) Fix compiler error in rcar-gen3-usb2 phy when USB is disabled Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJaM6dKAAoJEA5ceFyATYLZukMP/2/PmK9ImYBszZ0/XsaUtG10 10u2r0cdha7SADg+6vtejrlZ1tbXyd0Ul5t+Gg1xCe5O/CuN3/dTRfk56bY7DiN/ vr+SDFaZ2eJCDshUA6O3IK/1cQQ6Y8P9NOwPKtgOiUoZ1uKU51f84NYsdcPUSxCk JfcDU5T2msz6zooKxHf/sgXCXw7WD6fV1pgc6nB3jbxN7Gsi0cnczkrUiLLWWLsH b68Q/vjvXVSHpoGcXSo1V4DjUbfwMeYnEAvx2Uld6vUpNY0i1iBVI7szeDXm9Tk5 HMXykfRnupnXn+FsqRgPs4YpY9seokIyNcLA1JugF0o4jtypcyEYDwP8j1uUsCwK A0rpMk3E0fKFuWTDiwaT10wbQCikc1CSxwu+6qga3MjIdCIPIC21p6GgOfkgtk30 05M1oQ8IVrebnB3zD0eSEVg7VcM1eKfyIhaJmUQyz9KUjzyiIO7SqcTFKM/JXVtL +VLRj2rXT80DxLWA0syA3KBPitzHhRZi1WFiZb2C7opv1/RWezIGrqXGpMRGoKeW 8tDf6MErPHp9RFDZGSILWGIPuvtLIM+um5ZOju+Dd9WhTORRhcDvw3LmEwMz2Cnt J1WIklm74Yv3IowvTAzFxZenxu8DX9DuIT5ADNXU8iSAwhpo49iZPeQe/JKLOJvw IGFXl+gS3DdyTGZgMgAs =0oTN -----END PGP SIGNATURE----- Merge tag 'phy-for-4.15-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.15 -rc *) Fix device-tree node lookups in tegra xusb *) Fix platform_get_irq_byname's error checking in cpcap-usb phy driver *) Fix in rockchip-typec phy driver to balance pm_runtime_enable/disable *) Fix compiler error in rcar-gen3-usb2 phy when USB is disabled Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
commit
6074bc0c85
@ -310,7 +310,7 @@ static int cpcap_usb_init_irq(struct platform_device *pdev,
|
||||
int irq, error;
|
||||
|
||||
irq = platform_get_irq_byname(pdev, name);
|
||||
if (!irq)
|
||||
if (irq < 0)
|
||||
return -ENODEV;
|
||||
|
||||
error = devm_request_threaded_irq(ddata->dev, irq, NULL,
|
||||
|
@ -12,7 +12,9 @@ config PHY_RCAR_GEN3_USB2
|
||||
tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
|
||||
depends on ARCH_RENESAS
|
||||
depends on EXTCON
|
||||
depends on USB_SUPPORT
|
||||
select GENERIC_PHY
|
||||
select USB_COMMON
|
||||
help
|
||||
Support for USB 2.0 PHY found on Renesas R-Car generation 3 SoCs.
|
||||
|
||||
|
@ -1137,6 +1137,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(phy)) {
|
||||
dev_err(dev, "failed to create phy: %s\n",
|
||||
child_np->name);
|
||||
pm_runtime_disable(dev);
|
||||
return PTR_ERR(phy);
|
||||
}
|
||||
|
||||
@ -1146,6 +1147,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
|
||||
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
|
||||
if (IS_ERR(phy_provider)) {
|
||||
dev_err(dev, "Failed to register phy provider\n");
|
||||
pm_runtime_disable(dev);
|
||||
return PTR_ERR(phy_provider);
|
||||
}
|
||||
|
||||
|
@ -75,14 +75,14 @@ MODULE_DEVICE_TABLE(of, tegra_xusb_padctl_of_match);
|
||||
static struct device_node *
|
||||
tegra_xusb_find_pad_node(struct tegra_xusb_padctl *padctl, const char *name)
|
||||
{
|
||||
/*
|
||||
* of_find_node_by_name() drops a reference, so make sure to grab one.
|
||||
*/
|
||||
struct device_node *np = of_node_get(padctl->dev->of_node);
|
||||
struct device_node *pads, *np;
|
||||
|
||||
np = of_find_node_by_name(np, "pads");
|
||||
if (np)
|
||||
np = of_find_node_by_name(np, name);
|
||||
pads = of_get_child_by_name(padctl->dev->of_node, "pads");
|
||||
if (!pads)
|
||||
return NULL;
|
||||
|
||||
np = of_get_child_by_name(pads, name);
|
||||
of_node_put(pads);
|
||||
|
||||
return np;
|
||||
}
|
||||
@ -90,16 +90,16 @@ tegra_xusb_find_pad_node(struct tegra_xusb_padctl *padctl, const char *name)
|
||||
static struct device_node *
|
||||
tegra_xusb_pad_find_phy_node(struct tegra_xusb_pad *pad, unsigned int index)
|
||||
{
|
||||
/*
|
||||
* of_find_node_by_name() drops a reference, so make sure to grab one.
|
||||
*/
|
||||
struct device_node *np = of_node_get(pad->dev.of_node);
|
||||
struct device_node *np, *lanes;
|
||||
|
||||
np = of_find_node_by_name(np, "lanes");
|
||||
if (!np)
|
||||
lanes = of_get_child_by_name(pad->dev.of_node, "lanes");
|
||||
if (!lanes)
|
||||
return NULL;
|
||||
|
||||
return of_find_node_by_name(np, pad->soc->lanes[index].name);
|
||||
np = of_get_child_by_name(lanes, pad->soc->lanes[index].name);
|
||||
of_node_put(lanes);
|
||||
|
||||
return np;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -195,7 +195,7 @@ int tegra_xusb_pad_register(struct tegra_xusb_pad *pad,
|
||||
unsigned int i;
|
||||
int err;
|
||||
|
||||
children = of_find_node_by_name(pad->dev.of_node, "lanes");
|
||||
children = of_get_child_by_name(pad->dev.of_node, "lanes");
|
||||
if (!children)
|
||||
return -ENODEV;
|
||||
|
||||
@ -444,21 +444,21 @@ static struct device_node *
|
||||
tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
|
||||
unsigned int index)
|
||||
{
|
||||
/*
|
||||
* of_find_node_by_name() drops a reference, so make sure to grab one.
|
||||
*/
|
||||
struct device_node *np = of_node_get(padctl->dev->of_node);
|
||||
struct device_node *ports, *np;
|
||||
char *name;
|
||||
|
||||
np = of_find_node_by_name(np, "ports");
|
||||
if (np) {
|
||||
char *name;
|
||||
ports = of_get_child_by_name(padctl->dev->of_node, "ports");
|
||||
if (!ports)
|
||||
return NULL;
|
||||
|
||||
name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
|
||||
if (!name)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
np = of_find_node_by_name(np, name);
|
||||
kfree(name);
|
||||
name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
|
||||
if (!name) {
|
||||
of_node_put(ports);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
np = of_get_child_by_name(ports, name);
|
||||
kfree(name);
|
||||
of_node_put(ports);
|
||||
|
||||
return np;
|
||||
}
|
||||
@ -847,7 +847,7 @@ static void tegra_xusb_remove_ports(struct tegra_xusb_padctl *padctl)
|
||||
|
||||
static int tegra_xusb_padctl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = of_node_get(pdev->dev.of_node);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
const struct tegra_xusb_padctl_soc *soc;
|
||||
struct tegra_xusb_padctl *padctl;
|
||||
const struct of_device_id *match;
|
||||
@ -855,7 +855,7 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
|
||||
int err;
|
||||
|
||||
/* for backwards compatibility with old device trees */
|
||||
np = of_find_node_by_name(np, "pads");
|
||||
np = of_get_child_by_name(np, "pads");
|
||||
if (!np) {
|
||||
dev_warn(&pdev->dev, "deprecated DT, using legacy driver\n");
|
||||
return tegra_xusb_padctl_legacy_probe(pdev);
|
||||
|
Loading…
Reference in New Issue
Block a user