aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
diff options
context:
space:
mode:
authorRahul Sharma <rahul.sharma@samsung.com>2012-11-28 01:00:25 -0500
committerInki Dae <inki.dae@samsung.com>2012-12-14 01:40:49 -0500
commita55622570dc3e2d294db2ca7677cc32d65dfbf33 (patch)
tree4d32dddb29a143261390cb44e7a24c16ab3ae473 /drivers/gpu/drm/exynos/exynos_hdmi.c
parent000f13083d38681eaa3038c65d499f6ad5d62625 (diff)
drm/exynos: add support for hdmiphy power control for exynos5
This patch adds support for controlling power of hdmi phy for exynos5 soc. A special bit is provided in exynos5 for directly switching of PHY while in exynos4, phy power needs to be controlled through i2c settings. I2C configuration may affect the suspend to resume and wake-up time requirements hence not added. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 98c587321521..68936e6aa6ab 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2003,6 +2003,24 @@ static void hdmiphy_conf_reset(struct hdmi_context *hdata)
2003 mdelay(10); 2003 mdelay(10);
2004} 2004}
2005 2005
2006static void hdmiphy_poweron(struct hdmi_context *hdata)
2007{
2008 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
2009
2010 if (hdata->type == HDMI_TYPE14)
2011 hdmi_reg_writemask(hdata, HDMI_PHY_CON_0, 0,
2012 HDMI_PHY_POWER_OFF_EN);
2013}
2014
2015static void hdmiphy_poweroff(struct hdmi_context *hdata)
2016{
2017 DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
2018
2019 if (hdata->type == HDMI_TYPE14)
2020 hdmi_reg_writemask(hdata, HDMI_PHY_CON_0, ~0,
2021 HDMI_PHY_POWER_OFF_EN);
2022}
2023
2006static void hdmiphy_conf_apply(struct hdmi_context *hdata) 2024static void hdmiphy_conf_apply(struct hdmi_context *hdata)
2007{ 2025{
2008 const u8 *hdmiphy_data; 2026 const u8 *hdmiphy_data;
@@ -2175,6 +2193,8 @@ static void hdmi_poweron(struct hdmi_context *hdata)
2175 clk_enable(res->hdmiphy); 2193 clk_enable(res->hdmiphy);
2176 clk_enable(res->hdmi); 2194 clk_enable(res->hdmi);
2177 clk_enable(res->sclk_hdmi); 2195 clk_enable(res->sclk_hdmi);
2196
2197 hdmiphy_poweron(hdata);
2178} 2198}
2179 2199
2180static void hdmi_poweroff(struct hdmi_context *hdata) 2200static void hdmi_poweroff(struct hdmi_context *hdata)
@@ -2193,6 +2213,7 @@ static void hdmi_poweroff(struct hdmi_context *hdata)
2193 * its reset state seems to meet the condition. 2213 * its reset state seems to meet the condition.
2194 */ 2214 */
2195 hdmiphy_conf_reset(hdata); 2215 hdmiphy_conf_reset(hdata);
2216 hdmiphy_poweroff(hdata);
2196 2217
2197 clk_disable(res->sclk_hdmi); 2218 clk_disable(res->sclk_hdmi);
2198 clk_disable(res->hdmi); 2219 clk_disable(res->hdmi);