Skip to content

Commit

Permalink
drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power()
Browse files Browse the repository at this point in the history
dw_hdmi_phy_enable_power() is not about enabling and disabling power.
It is about allowing or preventing power-down mode being entered - the
register is documented as "Power-down enable (active low 0b)."

This can be seen as the bit has no effect when the HDMI phy is
operational on iMX6 hardware.

Rename the function to dw_hdmi_phy_enable_powerdown() to reflect the
documentation, make it take a bool for the 'enable' argument, and invert
the value to be written.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Aug 18, 2015
1 parent 552e678 commit 2fada10
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/gpu/drm/bridge/dw_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ static int hdmi_phy_i2c_write(struct dw_hdmi *hdmi, unsigned short data,
return 0;
}

static void dw_hdmi_phy_enable_power(struct dw_hdmi *hdmi, u8 enable)
static void dw_hdmi_phy_enable_powerdown(struct dw_hdmi *hdmi, bool enable)
{
hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0,
hdmi_mask_writeb(hdmi, !enable, HDMI_PHY_CONF0,
HDMI_PHY_CONF0_PDZ_OFFSET,
HDMI_PHY_CONF0_PDZ_MASK);
}
Expand Down Expand Up @@ -879,7 +879,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi, unsigned char prep,
/* REMOVE CLK TERM */
hdmi_phy_i2c_write(hdmi, 0x8000, 0x05); /* CKCALCTRL */

dw_hdmi_phy_enable_power(hdmi, 1);
dw_hdmi_phy_enable_powerdown(hdmi, false);

/* toggle TMDS enable */
dw_hdmi_phy_enable_tmds(hdmi, 0);
Expand Down Expand Up @@ -924,7 +924,7 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi)
dw_hdmi_phy_sel_data_en_pol(hdmi, 1);
dw_hdmi_phy_sel_interface_control(hdmi, 0);
dw_hdmi_phy_enable_tmds(hdmi, 0);
dw_hdmi_phy_enable_power(hdmi, 0);
dw_hdmi_phy_enable_powerdown(hdmi, true);

/* Enable CSC */
ret = hdmi_phy_configure(hdmi, 0, 8, cscon);
Expand Down Expand Up @@ -1141,7 +1141,7 @@ static void dw_hdmi_phy_disable(struct dw_hdmi *hdmi)
return;

dw_hdmi_phy_enable_tmds(hdmi, 0);
dw_hdmi_phy_enable_power(hdmi, 0);
dw_hdmi_phy_enable_powerdown(hdmi, true);

hdmi->phy_enabled = false;
}
Expand Down

0 comments on commit 2fada10

Please sign in to comment.