Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy-rockchip-pcie: remove deassert of phy_rst from exit callback

The deassert of phy_rst from exit callback is incorrect as when
doing phy_exit, we expect the phy_rst is on asserted state which was
done by power_off callback, but not deasserted state. Meanwhile when
disabling clk_pciephy_ref, the assert/deassert signal can't actually
take effect on the phy. So let's fix it anyway.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Shawn Lin and committed by
Kishon Vijay Abraham I
232c2609 76632542

+1 -12
+1 -12
drivers/phy/phy-rockchip-pcie.c
··· 249 249 static int rockchip_pcie_phy_exit(struct phy *phy) 250 250 { 251 251 struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy); 252 - int err = 0; 253 252 254 253 clk_disable_unprepare(rk_phy->clk_pciephy_ref); 255 254 256 - err = reset_control_deassert(rk_phy->phy_rst); 257 - if (err) { 258 - dev_err(&phy->dev, "deassert phy_rst err %d\n", err); 259 - goto err_reset; 260 - } 261 - 262 - return err; 263 - 264 - err_reset: 265 - clk_prepare_enable(rk_phy->clk_pciephy_ref); 266 - return err; 255 + return 0; 267 256 } 268 257 269 258 static const struct phy_ops ops = {