aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJassi Brar <jaswinder.singh@linaro.org>2012-06-27 10:04:36 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-06-29 02:41:33 -0400
commitece2f1539e917a4f23c30c2cca41ed5aa127abe3 (patch)
tree7f64646ab730719fc0303bfc4a8a9aa045efd254 /drivers/video
parent6f1891fc70d99eef9877925821572b8a3c5d9fd5 (diff)
OMAPDSS: HDMI: Discard phy_tx_enabled member
It is simpler to read the current status from a register as compared to maintaining a state variable to hold the information. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/ti_hdmi.h1
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c11
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h
index e734cb444bc7..d174ca128932 100644
--- a/drivers/video/omap2/dss/ti_hdmi.h
+++ b/drivers/video/omap2/dss/ti_hdmi.h
@@ -177,7 +177,6 @@ struct hdmi_ip_data {
177 177
178 /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */ 178 /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */
179 int hpd_gpio; 179 int hpd_gpio;
180 bool phy_tx_enabled;
181}; 180};
182int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data); 181int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data);
183void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data); 182void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data);
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
index 4dae1b291079..3fa3d98d1ae7 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
@@ -157,6 +157,10 @@ static int hdmi_pll_init(struct hdmi_ip_data *ip_data)
157/* PHY_PWR_CMD */ 157/* PHY_PWR_CMD */
158static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, enum hdmi_phy_pwr val) 158static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, enum hdmi_phy_pwr val)
159{ 159{
160 /* Return if already the state */
161 if (REG_GET(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, 5, 4) == val)
162 return 0;
163
160 /* Command for power control of HDMI PHY */ 164 /* Command for power control of HDMI PHY */
161 REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, val, 7, 6); 165 REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, val, 7, 6);
162 166
@@ -241,11 +245,6 @@ static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data)
241 245
242 hpd = gpio_get_value(ip_data->hpd_gpio); 246 hpd = gpio_get_value(ip_data->hpd_gpio);
243 247
244 if (hpd == ip_data->phy_tx_enabled) {
245 spin_unlock_irqrestore(&phy_tx_lock, flags);
246 return 0;
247 }
248
249 if (hpd) 248 if (hpd)
250 r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON); 249 r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON);
251 else 250 else
@@ -257,7 +256,6 @@ static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data)
257 goto err; 256 goto err;
258 } 257 }
259 258
260 ip_data->phy_tx_enabled = hpd;
261err: 259err:
262 spin_unlock_irqrestore(&phy_tx_lock, flags); 260 spin_unlock_irqrestore(&phy_tx_lock, flags);
263 return r; 261 return r;
@@ -327,7 +325,6 @@ void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data)
327 free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data); 325 free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data);
328 326
329 hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); 327 hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF);
330 ip_data->phy_tx_enabled = false;
331} 328}
332 329
333static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data) 330static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data)