提交 a8b517e5 编写于 作者: J Jean-Francois Moine 提交者: Russell King

drm/i2c: tda998x: code optimization

This patch reduces the number of I2C exchanges by setting many bits in
one write and removing a useless write.
Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 85c988bb
...@@ -669,10 +669,8 @@ tda998x_configure_audio(struct tda998x_priv *priv, ...@@ -669,10 +669,8 @@ tda998x_configure_audio(struct tda998x_priv *priv,
} }
reg_write(priv, REG_AIP_CLKSEL, clksel_aip); reg_write(priv, REG_AIP_CLKSEL, clksel_aip);
reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT |
AIP_CNTRL_0_ACR_MAN); /* auto CTS */
/* Enable automatic CTS generation */
reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN);
reg_write(priv, REG_CTS_N, cts_n); reg_write(priv, REG_CTS_N, cts_n);
/* /*
...@@ -908,10 +906,10 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, ...@@ -908,10 +906,10 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder,
reg_write(priv, REG_VIP_CNTRL_5, VIP_CNTRL_5_SP_CNT(0)); reg_write(priv, REG_VIP_CNTRL_5, VIP_CNTRL_5_SP_CNT(0));
reg_write(priv, REG_VIP_CNTRL_4, VIP_CNTRL_4_BLANKIT(0) | reg_write(priv, REG_VIP_CNTRL_4, VIP_CNTRL_4_BLANKIT(0) |
VIP_CNTRL_4_BLC(0)); VIP_CNTRL_4_BLC(0));
reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR);
reg_clear(priv, REG_PLL_SERIAL_1, PLL_SERIAL_1_SRL_MAN_IZ); reg_clear(priv, REG_PLL_SERIAL_1, PLL_SERIAL_1_SRL_MAN_IZ);
reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_DE); reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR |
PLL_SERIAL_3_SRL_DE);
reg_write(priv, REG_SERIALIZER, 0); reg_write(priv, REG_SERIALIZER, 0);
reg_write(priv, REG_HVF_CNTRL_1, HVF_CNTRL_1_VQR(0)); reg_write(priv, REG_HVF_CNTRL_1, HVF_CNTRL_1_VQR(0));
...@@ -931,8 +929,6 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, ...@@ -931,8 +929,6 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder,
/* set BIAS tmds value: */ /* set BIAS tmds value: */
reg_write(priv, REG_ANA_GENERAL, 0x09); reg_write(priv, REG_ANA_GENERAL, 0x09);
reg_write(priv, REG_TBG_CNTRL_0, 0);
/* /*
* Sync on rising HSYNC/VSYNC * Sync on rising HSYNC/VSYNC
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册