aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Bugge <marbugge@cisco.com>2013-12-20 03:14:57 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 03:16:54 -0500
commit9890869651fc8bc3876f2eb839ac403edb47560d (patch)
treec7dad45b4a2b564eab8f6ca75a3c5fccab336963
parentd48eb48cd4d497e2e65c68d3ca3976a8dbfc992e (diff)
[media] adv7604: sync polarities from platform data
Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/i2c/adv7604.c5
-rw-r--r--include/media/adv7604.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 0bc9e1a8c07e..be9699e28738 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2126,9 +2126,10 @@ static int adv7604_core_init(struct v4l2_subdev *sd)
2126 pdata->replicate_av_codes << 1 | 2126 pdata->replicate_av_codes << 1 |
2127 pdata->invert_cbcr << 0); 2127 pdata->invert_cbcr << 0);
2128 2128
2129 /* TODO from platform data */
2130 cp_write(sd, 0x69, 0x30); /* Enable CP CSC */ 2129 cp_write(sd, 0x69, 0x30); /* Enable CP CSC */
2131 io_write(sd, 0x06, 0xa6); /* positive VS and HS */ 2130
2131 /* VS, HS polarities */
2132 io_write(sd, 0x06, 0xa0 | pdata->inv_vs_pol << 2 | pdata->inv_hs_pol << 1);
2132 2133
2133 /* Adjust drive strength */ 2134 /* Adjust drive strength */
2134 io_write(sd, 0x14, 0x40 | pdata->dr_str_data << 4 | 2135 io_write(sd, 0x14, 0x40 | pdata->dr_str_data << 4 |
diff --git a/include/media/adv7604.h b/include/media/adv7604.h
index baf7250ee8a1..d262a3a922bd 100644
--- a/include/media/adv7604.h
+++ b/include/media/adv7604.h
@@ -113,6 +113,10 @@ struct adv7604_platform_data {
113 unsigned replicate_av_codes:1; 113 unsigned replicate_av_codes:1;
114 unsigned invert_cbcr:1; 114 unsigned invert_cbcr:1;
115 115
116 /* IO register 0x06 */
117 unsigned inv_vs_pol:1;
118 unsigned inv_hs_pol:1;
119
116 /* IO register 0x14 */ 120 /* IO register 0x14 */
117 enum adv7604_drive_strength dr_str_data; 121 enum adv7604_drive_strength dr_str_data;
118 enum adv7604_drive_strength dr_str_clk; 122 enum adv7604_drive_strength dr_str_clk;