diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-10-23 06:25:02 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-11-17 19:00:40 -0500 |
commit | 94579273b893f67c5806d8a61a0ca072b0f7a141 (patch) | |
tree | 8dc2d81bcc259c8d9511b645607ff3ad0c869699 | |
parent | 95a9b686d679059adf491ff116f936de63fcec29 (diff) |
drm/i2c: tda998x: move and rename tda998x_encoder_set_config()
The naming of tda998x_encoder_set_config() is a left-over from when
TDA998x was a slave encoder. Since this is part of the initialisation,
drop the _encoder from the name, and move it near tda998x_bind().
Tested-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Jon Medhurst <tixy@linaro.org>
Acked-by: Jon Medhurst <tixy@linaro.org>
Tested-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 662ac93ccc19..dc23ae5374d1 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -822,25 +822,6 @@ tda998x_configure_audio(struct tda998x_priv *priv, | |||
822 | 822 | ||
823 | /* DRM encoder functions */ | 823 | /* DRM encoder functions */ |
824 | 824 | ||
825 | static void tda998x_encoder_set_config(struct tda998x_priv *priv, | ||
826 | const struct tda998x_encoder_params *p) | ||
827 | { | ||
828 | priv->vip_cntrl_0 = VIP_CNTRL_0_SWAP_A(p->swap_a) | | ||
829 | (p->mirr_a ? VIP_CNTRL_0_MIRR_A : 0) | | ||
830 | VIP_CNTRL_0_SWAP_B(p->swap_b) | | ||
831 | (p->mirr_b ? VIP_CNTRL_0_MIRR_B : 0); | ||
832 | priv->vip_cntrl_1 = VIP_CNTRL_1_SWAP_C(p->swap_c) | | ||
833 | (p->mirr_c ? VIP_CNTRL_1_MIRR_C : 0) | | ||
834 | VIP_CNTRL_1_SWAP_D(p->swap_d) | | ||
835 | (p->mirr_d ? VIP_CNTRL_1_MIRR_D : 0); | ||
836 | priv->vip_cntrl_2 = VIP_CNTRL_2_SWAP_E(p->swap_e) | | ||
837 | (p->mirr_e ? VIP_CNTRL_2_MIRR_E : 0) | | ||
838 | VIP_CNTRL_2_SWAP_F(p->swap_f) | | ||
839 | (p->mirr_f ? VIP_CNTRL_2_MIRR_F : 0); | ||
840 | |||
841 | priv->audio_params = p->audio_params; | ||
842 | } | ||
843 | |||
844 | static void tda998x_encoder_dpms(struct drm_encoder *encoder, int mode) | 825 | static void tda998x_encoder_dpms(struct drm_encoder *encoder, int mode) |
845 | { | 826 | { |
846 | struct tda998x_priv *priv = enc_to_tda998x_priv(encoder); | 827 | struct tda998x_priv *priv = enc_to_tda998x_priv(encoder); |
@@ -1636,6 +1617,25 @@ static const struct drm_connector_funcs tda998x_connector_funcs = { | |||
1636 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 1617 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
1637 | }; | 1618 | }; |
1638 | 1619 | ||
1620 | static void tda998x_set_config(struct tda998x_priv *priv, | ||
1621 | const struct tda998x_encoder_params *p) | ||
1622 | { | ||
1623 | priv->vip_cntrl_0 = VIP_CNTRL_0_SWAP_A(p->swap_a) | | ||
1624 | (p->mirr_a ? VIP_CNTRL_0_MIRR_A : 0) | | ||
1625 | VIP_CNTRL_0_SWAP_B(p->swap_b) | | ||
1626 | (p->mirr_b ? VIP_CNTRL_0_MIRR_B : 0); | ||
1627 | priv->vip_cntrl_1 = VIP_CNTRL_1_SWAP_C(p->swap_c) | | ||
1628 | (p->mirr_c ? VIP_CNTRL_1_MIRR_C : 0) | | ||
1629 | VIP_CNTRL_1_SWAP_D(p->swap_d) | | ||
1630 | (p->mirr_d ? VIP_CNTRL_1_MIRR_D : 0); | ||
1631 | priv->vip_cntrl_2 = VIP_CNTRL_2_SWAP_E(p->swap_e) | | ||
1632 | (p->mirr_e ? VIP_CNTRL_2_MIRR_E : 0) | | ||
1633 | VIP_CNTRL_2_SWAP_F(p->swap_f) | | ||
1634 | (p->mirr_f ? VIP_CNTRL_2_MIRR_F : 0); | ||
1635 | |||
1636 | priv->audio_params = p->audio_params; | ||
1637 | } | ||
1638 | |||
1639 | static int tda998x_bind(struct device *dev, struct device *master, void *data) | 1639 | static int tda998x_bind(struct device *dev, struct device *master, void *data) |
1640 | { | 1640 | { |
1641 | struct tda998x_encoder_params *params = dev->platform_data; | 1641 | struct tda998x_encoder_params *params = dev->platform_data; |
@@ -1668,7 +1668,7 @@ static int tda998x_bind(struct device *dev, struct device *master, void *data) | |||
1668 | return ret; | 1668 | return ret; |
1669 | 1669 | ||
1670 | if (!dev->of_node && params) | 1670 | if (!dev->of_node && params) |
1671 | tda998x_encoder_set_config(priv, params); | 1671 | tda998x_set_config(priv, params); |
1672 | 1672 | ||
1673 | tda998x_encoder_set_polling(priv, &priv->connector); | 1673 | tda998x_encoder_set_polling(priv, &priv->connector); |
1674 | 1674 | ||