Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Merge tag 'phy-for-4.9-rc' of...

Merge tag 'phy-for-4.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy

 into usb-linus

Kishon writes:

phy: for 4.9 -rc

phy fixes:
*) Add a empty function for phy_reset when CONFIG_GENERIC_PHY is not set
*) change the phy lookup table for da8xx-usb to match it with the name
   present in the board configuraion file (used for non-dt boot)
*) Fix incorrect programming sequence in w.r.t deassert of phy_rst
   in phy-rockchip-pcie
*) Fix to avoid NULL pointer dereferencing error in sun4i phy

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parents d6124b40 4320f9d4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
	} else {
		int ret;

		ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
		ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy",
					"ohci-da8xx");
		if (ret)
			dev_warn(dev, "Failed to create usb11 phy lookup\n");
		ret = phy_create_lookup(d_phy->usb20_phy, "usb-phy",
@@ -216,7 +217,7 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)

	if (!pdev->dev.of_node) {
		phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
	}

	return 0;
+1 −12
Original line number Diff line number Diff line
@@ -249,21 +249,10 @@ static int rockchip_pcie_phy_init(struct phy *phy)
static int rockchip_pcie_phy_exit(struct phy *phy)
{
	struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
	int err = 0;

	clk_disable_unprepare(rk_phy->clk_pciephy_ref);

	err = reset_control_deassert(rk_phy->phy_rst);
	if (err) {
		dev_err(&phy->dev, "deassert phy_rst err %d\n", err);
		goto err_reset;
	}

	return err;

err_reset:
	clk_prepare_enable(rk_phy->clk_pciephy_ref);
	return err;
	return 0;
}

static const struct phy_ops ops = {
+1 −1
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
		return ret;
	}

	if (data->cfg->enable_pmu_unk1) {
	if (phy->pmu && data->cfg->enable_pmu_unk1) {
		val = readl(phy->pmu + REG_PMU_UNK1);
		writel(val & ~2, phy->pmu + REG_PMU_UNK1);
	}
+7 −0
Original line number Diff line number Diff line
@@ -253,6 +253,13 @@ static inline int phy_set_mode(struct phy *phy, enum phy_mode mode)
	return -ENOSYS;
}

static inline int phy_reset(struct phy *phy)
{
	if (!phy)
		return 0;
	return -ENOSYS;
}

static inline int phy_get_bus_width(struct phy *phy)
{
	return -ENOSYS;