Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power()

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>

+5 -5
+5 -5
drivers/gpu/drm/bridge/dw_hdmi.c
··· 737 737 return 0; 738 738 } 739 739 740 - static void dw_hdmi_phy_enable_power(struct dw_hdmi *hdmi, u8 enable) 740 + static void dw_hdmi_phy_enable_powerdown(struct dw_hdmi *hdmi, bool enable) 741 741 { 742 - hdmi_mask_writeb(hdmi, enable, HDMI_PHY_CONF0, 742 + hdmi_mask_writeb(hdmi, !enable, HDMI_PHY_CONF0, 743 743 HDMI_PHY_CONF0_PDZ_OFFSET, 744 744 HDMI_PHY_CONF0_PDZ_MASK); 745 745 } ··· 879 879 /* REMOVE CLK TERM */ 880 880 hdmi_phy_i2c_write(hdmi, 0x8000, 0x05); /* CKCALCTRL */ 881 881 882 - dw_hdmi_phy_enable_power(hdmi, 1); 882 + dw_hdmi_phy_enable_powerdown(hdmi, false); 883 883 884 884 /* toggle TMDS enable */ 885 885 dw_hdmi_phy_enable_tmds(hdmi, 0); ··· 924 924 dw_hdmi_phy_sel_data_en_pol(hdmi, 1); 925 925 dw_hdmi_phy_sel_interface_control(hdmi, 0); 926 926 dw_hdmi_phy_enable_tmds(hdmi, 0); 927 - dw_hdmi_phy_enable_power(hdmi, 0); 927 + dw_hdmi_phy_enable_powerdown(hdmi, true); 928 928 929 929 /* Enable CSC */ 930 930 ret = hdmi_phy_configure(hdmi, 0, 8, cscon); ··· 1141 1141 return; 1142 1142 1143 1143 dw_hdmi_phy_enable_tmds(hdmi, 0); 1144 - dw_hdmi_phy_enable_power(hdmi, 0); 1144 + dw_hdmi_phy_enable_powerdown(hdmi, true); 1145 1145 1146 1146 hdmi->phy_enabled = false; 1147 1147 }