mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
phy: rockchip-typec: Try to turn the DP PHY on several times
Change-Id: I945abf00bfd2b56600f25a8ee256988790f0a2dc Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
This commit is contained in:
@@ -1467,9 +1467,8 @@ static const struct phy_ops rockchip_usb3_phy_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int rockchip_dp_phy_power_on(struct phy *phy)
|
||||
static int _rockchip_dp_phy_power_on(struct rockchip_typec_phy *tcphy)
|
||||
{
|
||||
struct rockchip_typec_phy *tcphy = phy_get_drvdata(phy);
|
||||
const struct rockchip_usb3phy_port_cfg *cfg = tcphy->port_cfgs;
|
||||
int new_mode, ret = 0;
|
||||
u32 val;
|
||||
@@ -1532,6 +1531,24 @@ unlock_ret:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rockchip_dp_phy_power_on(struct phy *phy)
|
||||
{
|
||||
struct rockchip_typec_phy *tcphy = phy_get_drvdata(phy);
|
||||
int ret;
|
||||
int tries;
|
||||
|
||||
for (tries = 0; tries < POWER_ON_TRIES; tries++) {
|
||||
ret = _rockchip_dp_phy_power_on(tcphy);
|
||||
if (!ret)
|
||||
break;
|
||||
}
|
||||
|
||||
if (tries && !ret)
|
||||
dev_info(tcphy->dev, "Needed %d loops to turn on dp phy\n", tries);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rockchip_dp_phy_power_off(struct phy *phy)
|
||||
{
|
||||
struct rockchip_typec_phy *tcphy = phy_get_drvdata(phy);
|
||||
|
||||
Reference in New Issue
Block a user