Commit 6074bc0c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'phy-for-4.15-rc_v2' of...

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: default avatarKishon Vijay Abraham I <kishon@ti.com>
parents 1291a0d5 2b88212c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -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.

+2 −0
Original line number Diff line number Diff line
@@ -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);
	}

+29 −29
Original line number Diff line number Diff line
@@ -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);

	np = of_find_node_by_name(np, "ports");
	if (np) {
	struct device_node *ports, *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)
	if (!name) {
		of_node_put(ports);
		return ERR_PTR(-ENOMEM);
		np = of_find_node_by_name(np, name);
		kfree(name);
	}
	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);