diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-06-28 18:20:43 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-17 19:29:44 +0200 |
commit | 8105e1bcfc223d8143c4678a33eb4b50238af2d4 (patch) | |
tree | 1f36a9e486335c8e25cbe471e3a1f21f5cff85d1 /drivers/media/i2c/tvp5150.c | |
parent | media: tvp5150: split reset/enable routine (diff) | |
download | linux-8105e1bcfc223d8143c4678a33eb4b50238af2d4.tar.xz linux-8105e1bcfc223d8143c4678a33eb4b50238af2d4.zip |
media: tvp5150: remove pin configuration from initialization tables
To allow optional interrupt support, we want to configure the pin settings
dynamically. Move those register accesses out of the static initialization
tables.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[m.felsch@pengutronix.de: drop init_default register remove]
[m.felsch@pengutronix.de: fix regmap access during reset()]
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/tvp5150.c')
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index fa75b40aa89e..eeb48ad01696 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -443,9 +443,7 @@ static const struct i2c_reg_value tvp5150_init_default[] = { /* Default values as sugested at TVP5150AM1 datasheet */ static const struct i2c_reg_value tvp5150_init_enable[] = { - { - TVP5150_CONF_SHARED_PIN, 2 - }, { /* Automatic offset and AGC enabled */ + { /* Automatic offset and AGC enabled */ TVP5150_ANAL_CHL_CTL, 0x15 }, { /* Activate YCrCb output 0x9 or 0xd ? */ TVP5150_MISC_CTL, TVP5150_MISC_CTL_GPCL | @@ -802,10 +800,14 @@ static v4l2_std_id tvp5150_read_std(struct v4l2_subdev *sd) static int tvp5150_reset(struct v4l2_subdev *sd, u32 val) { struct tvp5150 *decoder = to_tvp5150(sd); + struct regmap *map = decoder->regmap; /* Initializes TVP5150 to its default values */ tvp5150_write_inittab(sd, tvp5150_init_default); + /* Configure pins: FID, VSYNC, GPCL/VBLK, SCLK */ + regmap_write(map, TVP5150_CONF_SHARED_PIN, 0x2); + /* Initializes VDP registers */ tvp5150_vdp_init(sd); |