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>
This commit is contained in:
Jassi Brar 2012-06-27 19:34:36 +05:30 committed by Tomi Valkeinen
parent 6f1891fc70
commit ece2f1539e
2 changed files with 4 additions and 8 deletions

View File

@ -177,7 +177,6 @@ struct hdmi_ip_data {
/* ti_hdmi_4xxx_ip private data. These should be in a separate struct */ /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */
int hpd_gpio; int hpd_gpio;
bool phy_tx_enabled;
}; };
int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data); int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data);
void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data); void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data);

View File

@ -157,6 +157,10 @@ static int hdmi_pll_init(struct hdmi_ip_data *ip_data)
/* PHY_PWR_CMD */ /* PHY_PWR_CMD */
static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, enum hdmi_phy_pwr val) static int hdmi_set_phy_pwr(struct hdmi_ip_data *ip_data, enum hdmi_phy_pwr val)
{ {
/* Return if already the state */
if (REG_GET(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, 5, 4) == val)
return 0;
/* Command for power control of HDMI PHY */ /* Command for power control of HDMI PHY */
REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, val, 7, 6); REG_FLD_MOD(hdmi_wp_base(ip_data), HDMI_WP_PWR_CTRL, val, 7, 6);
@ -241,11 +245,6 @@ static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data)
hpd = gpio_get_value(ip_data->hpd_gpio); hpd = gpio_get_value(ip_data->hpd_gpio);
if (hpd == ip_data->phy_tx_enabled) {
spin_unlock_irqrestore(&phy_tx_lock, flags);
return 0;
}
if (hpd) if (hpd)
r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON); r = hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_TXON);
else else
@ -257,7 +256,6 @@ static int hdmi_check_hpd_state(struct hdmi_ip_data *ip_data)
goto err; goto err;
} }
ip_data->phy_tx_enabled = hpd;
err: err:
spin_unlock_irqrestore(&phy_tx_lock, flags); spin_unlock_irqrestore(&phy_tx_lock, flags);
return r; return r;
@ -327,7 +325,6 @@ void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data)
free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data); free_irq(gpio_to_irq(ip_data->hpd_gpio), ip_data);
hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF); hdmi_set_phy_pwr(ip_data, HDMI_PHYPWRCMD_OFF);
ip_data->phy_tx_enabled = false;
} }
static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data) static int hdmi_core_ddc_init(struct hdmi_ip_data *ip_data)