mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
phy: rockchip: usbdp: add a condition for orien switch registering
Registering orien switch only when "orientation-switch" property is configured in DT. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Change-Id: Ic2701911583d8ad047d596c3c91ba32b56d62fff
This commit is contained in:
@@ -1023,13 +1023,15 @@ static int rockchip_udphy_probe(struct platform_device *pdev)
|
||||
udphy->dev = dev;
|
||||
platform_set_drvdata(pdev, udphy);
|
||||
|
||||
ret = udphy_setup_orien_switch(udphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (device_property_present(dev, "orientation-switch")) {
|
||||
ret = udphy_setup_orien_switch(udphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = devm_add_action_or_reset(dev, udphy_orien_switch_unregister, udphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = devm_add_action_or_reset(dev, udphy_orien_switch_unregister, udphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = udphy_setup_typec_mux(udphy);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user