diff options
author | jean-michel.hautbois@vodalys.com <jean-michel.hautbois@vodalys.com> | 2015-02-04 09:16:00 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-03-02 12:56:21 -0500 |
commit | 80f4944ec2aecb64c213944f78745787e363672a (patch) | |
tree | 7165b585e820353c1a65281064f4325ce875cbfa | |
parent | 61765a50323977a5fde86f736f0e55a5e680fbcf (diff) |
[media] media: adv7604: CP CSC uses a different register on adv7604 and adv7611
The bits are the same, but register is 0xf4 on ADV7611 instead of 0xfc.
When reading back the value in log_status, differentiate both.
Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/i2c/adv7604.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 5f34e0ab06f3..8d455b766cc2 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c | |||
@@ -109,6 +109,7 @@ struct adv7604_chip_info { | |||
109 | unsigned int cable_det_mask; | 109 | unsigned int cable_det_mask; |
110 | unsigned int tdms_lock_mask; | 110 | unsigned int tdms_lock_mask; |
111 | unsigned int fmt_change_digital_mask; | 111 | unsigned int fmt_change_digital_mask; |
112 | unsigned int cp_csc; | ||
112 | 113 | ||
113 | const struct adv7604_format_info *formats; | 114 | const struct adv7604_format_info *formats; |
114 | unsigned int nformats; | 115 | unsigned int nformats; |
@@ -2241,7 +2242,7 @@ static int adv7604_log_status(struct v4l2_subdev *sd) | |||
2241 | ((reg_io_0x02 & 0x04) ^ (reg_io_0x02 & 0x01)) ? | 2242 | ((reg_io_0x02 & 0x04) ^ (reg_io_0x02 & 0x01)) ? |
2242 | "enabled" : "disabled"); | 2243 | "enabled" : "disabled"); |
2243 | v4l2_info(sd, "Color space conversion: %s\n", | 2244 | v4l2_info(sd, "Color space conversion: %s\n", |
2244 | csc_coeff_sel_rb[cp_read(sd, 0xfc) >> 4]); | 2245 | csc_coeff_sel_rb[cp_read(sd, info->cp_csc) >> 4]); |
2245 | 2246 | ||
2246 | if (!is_digital_input(sd)) | 2247 | if (!is_digital_input(sd)) |
2247 | return 0; | 2248 | return 0; |
@@ -2545,6 +2546,7 @@ static const struct adv7604_chip_info adv7604_chip_info[] = { | |||
2545 | .tdms_lock_mask = 0xe0, | 2546 | .tdms_lock_mask = 0xe0, |
2546 | .cable_det_mask = 0x1e, | 2547 | .cable_det_mask = 0x1e, |
2547 | .fmt_change_digital_mask = 0xc1, | 2548 | .fmt_change_digital_mask = 0xc1, |
2549 | .cp_csc = 0xfc, | ||
2548 | .formats = adv7604_formats, | 2550 | .formats = adv7604_formats, |
2549 | .nformats = ARRAY_SIZE(adv7604_formats), | 2551 | .nformats = ARRAY_SIZE(adv7604_formats), |
2550 | .set_termination = adv7604_set_termination, | 2552 | .set_termination = adv7604_set_termination, |
@@ -2578,6 +2580,7 @@ static const struct adv7604_chip_info adv7604_chip_info[] = { | |||
2578 | .tdms_lock_mask = 0x43, | 2580 | .tdms_lock_mask = 0x43, |
2579 | .cable_det_mask = 0x01, | 2581 | .cable_det_mask = 0x01, |
2580 | .fmt_change_digital_mask = 0x03, | 2582 | .fmt_change_digital_mask = 0x03, |
2583 | .cp_csc = 0xf4, | ||
2581 | .formats = adv7611_formats, | 2584 | .formats = adv7611_formats, |
2582 | .nformats = ARRAY_SIZE(adv7611_formats), | 2585 | .nformats = ARRAY_SIZE(adv7611_formats), |
2583 | .set_termination = adv7611_set_termination, | 2586 | .set_termination = adv7611_set_termination, |