summaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-exynos-dp-video.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-02-27 12:34:10 +0800
committerKishon Vijay Abraham I <kishon@ti.com>2015-03-12 11:01:15 +0530
commit0f9722e37f8359e228f4c04e6822ad0bf9a4e083 (patch)
tree4388e6ec12566ab6593a21c7f7e53a8049fd115d /drivers/phy/phy-exynos-dp-video.c
parentaf69decc7ca80fa24c77a5a00234f1cd2a957de8 (diff)
downloadop-kernel-dev-0f9722e37f8359e228f4c04e6822ad0bf9a4e083.zip
op-kernel-dev-0f9722e37f8359e228f4c04e6822ad0bf9a4e083.tar.gz
phy: exynos-dp-video: Kill exynos_dp_video_phy_pwr_isol function
If IS_ERR(state->regs) the .probe fails. So IS_ERR(state->regs) test in exynos_dp_video_phy_pwr_isol() is not necessary. exynos_dp_video_phy_pwr_isol() simply does a regmap_update_bits() call now, just call regmap_update_bits() instead and return proper return value. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/phy-exynos-dp-video.c')
-rw-r--r--drivers/phy/phy-exynos-dp-video.c24
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 f86cbe6..179cbf9 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 {
const struct exynos_dp_video_phy_drvdata *drvdata;
};
-static void exynos_dp_video_phy_pwr_isol(struct exynos_dp_video_phy *state,
- unsigned int on)
-{
- unsigned int val;
-
- if (IS_ERR(state->regs))
- return;
-
- val = on ? 0 : EXYNOS5_PHY_ENABLE;
-
- regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset,
- EXYNOS5_PHY_ENABLE, val);
-}
-
static int exynos_dp_video_phy_power_on(struct phy *phy)
{
struct exynos_dp_video_phy *state = phy_get_drvdata(phy);
/* Disable power isolation on DP-PHY */
- exynos_dp_video_phy_pwr_isol(state, 0);
-
- return 0;
+ return regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset,
+ EXYNOS5_PHY_ENABLE, EXYNOS5_PHY_ENABLE);
}
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)
struct exynos_dp_video_phy *state = phy_get_drvdata(phy);
/* Enable power isolation on DP-PHY */
- exynos_dp_video_phy_pwr_isol(state, 1);
-
- return 0;
+ return regmap_update_bits(state->regs, state->drvdata->phy_ctrl_offset,
+ EXYNOS5_PHY_ENABLE, 0);
}
static struct phy_ops exynos_dp_video_phy_ops = {
OpenPOWER on IntegriCloud