diff options
Diffstat (limited to 'drivers/phy/phy-exynos-dp-video.c')
| -rw-r--r-- | drivers/phy/phy-exynos-dp-video.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/phy/phy-exynos-dp-video.c b/drivers/phy/phy-exynos-dp-video.c index f86cbe68ddaf..179cbf9451aa 100644 --- a/drivers/phy/phy-exynos-dp-video.c +++ b/drivers/phy/phy-exynos-dp-video.c | |||
| @@ -30,28 +30,13 @@ struct exynos_dp_video_phy { | |||
| 30 | const struct exynos_dp_video_phy_drvdata *drvdata; | 30 | const struct exynos_dp_video_phy_drvdata *drvdata; |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | static void exynos_dp_video_phy_pwr_isol(struct exynos_dp_video_phy *state, | ||
| 34 | unsigned int on) | ||
| 35 | { | ||
| 36 | unsigned int val; | ||
| 37 | |||
| 38 | if (IS_ERR(state->regs)) | ||
| 39 | return; | ||
| 40 | |||
| 41 | val = on ? 0 : EXYNOS5_PHY_ENABLE; | ||
| 42 | |||
| 43 | regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset, | ||
| 44 | EXYNOS5_PHY_ENABLE, val); | ||
| 45 | } | ||
| 46 | |||
| 47 | static int exynos_dp_video_phy_power_on(struct phy *phy) | 33 | static int exynos_dp_video_phy_power_on(struct phy *phy) |
| 48 | { | 34 | { |
| 49 | struct exynos_dp_video_phy *state = phy_get_drvdata(phy); | 35 | struct exynos_dp_video_phy *state = phy_get_drvdata(phy); |
| 50 | 36 | ||
| 51 | /* Disable power isolation on DP-PHY */ | 37 | /* Disable power isolation on DP-PHY */ |
| 52 | exynos_dp_video_phy_pwr_isol(state, 0); | 38 | return regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset, |
| 53 | 39 | EXYNOS5_PHY_ENABLE, EXYNOS5_PHY_ENABLE); | |
| 54 | return 0; | ||
| 55 | } | 40 | } |
| 56 | 41 | ||
| 57 | static int exynos_dp_video_phy_power_off(struct phy *phy) | 42 | static int exynos_dp_video_phy_power_off(struct phy *phy) |
| @@ -59,9 +44,8 @@ static int exynos_dp_video_phy_power_off(struct phy *phy) | |||
| 59 | struct exynos_dp_video_phy *state = phy_get_drvdata(phy); | 44 | struct exynos_dp_video_phy *state = phy_get_drvdata(phy); |
| 60 | 45 | ||
| 61 | /* Enable power isolation on DP-PHY */ | 46 | /* Enable power isolation on DP-PHY */ |
| 62 | exynos_dp_video_phy_pwr_isol(state, 1); | 47 | return regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset, |
| 63 | 48 | EXYNOS5_PHY_ENABLE, 0); | |
| 64 | return 0; | ||
| 65 | } | 49 | } |
| 66 | 50 | ||
| 67 | static struct phy_ops exynos_dp_video_phy_ops = { | 51 | static struct phy_ops exynos_dp_video_phy_ops = { |
