aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/sn9c102/sn9c102_ov7630.c
diff options
context:
space:
mode:
authorLuca Risolia <luca.risolia@studio.unibo.it>2007-05-02 10:04:03 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-05-09 10:12:38 -0300
commit480b55c26e2f6408e86f22a69fcecc29e019e819 (patch)
tree5df75439da6c7105f54f00aa76d9bdc20ffedd7f /drivers/media/video/sn9c102/sn9c102_ov7630.c
parentb3785596e3964656b9901f4eff73bf40b654d425 (diff)
V4L/DVB (5585): SN9C1xx driver updates
* Default color improvements to the OV7660 @ Fix sn9c102_write_reg() @ Fix sn9c102_i2c_try_raw_read() @ Fix MI-0343 + Add support for pair MI0360+SN9C120 + Add more USB ids Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/sn9c102/sn9c102_ov7630.c')
-rw-r--r--drivers/media/video/sn9c102/sn9c102_ov7630.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/media/video/sn9c102/sn9c102_ov7630.c b/drivers/media/video/sn9c102/sn9c102_ov7630.c
index 31b6080b061..e6832347894 100644
--- a/drivers/media/video/sn9c102/sn9c102_ov7630.c
+++ b/drivers/media/video/sn9c102/sn9c102_ov7630.c
@@ -29,9 +29,8 @@ static int ov7630_init(struct sn9c102_device* cam)
switch (sn9c102_get_bridge(cam)) {
case BRIDGE_SN9C101:
case BRIDGE_SN9C102:
- err = sn9c102_write_const_regs(cam, {0x00, 0x14},
- {0x60, 0x17}, {0x0f, 0x18},
- {0x50, 0x19});
+ err = sn9c102_write_const_regs(cam, {0x00, 0x14}, {0x60, 0x17},
+ {0x0f, 0x18}, {0x50, 0x19});
err += sn9c102_i2c_write(cam, 0x12, 0x8d);
err += sn9c102_i2c_write(cam, 0x12, 0x0d);
@@ -61,7 +60,6 @@ static int ov7630_init(struct sn9c102_device* cam)
err += sn9c102_i2c_write(cam, 0x71, 0x00);
err += sn9c102_i2c_write(cam, 0x74, 0x21);
err += sn9c102_i2c_write(cam, 0x7d, 0xf7);
-
break;
case BRIDGE_SN9C103:
err = sn9c102_write_const_regs(cam, {0x00, 0x02}, {0x00, 0x03},
@@ -253,7 +251,7 @@ static int ov7630_set_pix_format(struct sn9c102_device* cam,
}
-static struct sn9c102_sensor ov7630 = {
+static const struct sn9c102_sensor ov7630 = {
.name = "OV7630",
.maintainer = "Luca Risolia <luca.risolia@studio.unibo.it>",
.supported_bridge = BRIDGE_SN9C101 | BRIDGE_SN9C102 | BRIDGE_SN9C103,
@@ -408,19 +406,16 @@ int sn9c102_probe_ov7630(struct sn9c102_device* cam)
switch (sn9c102_get_bridge(cam)) {
case BRIDGE_SN9C101:
case BRIDGE_SN9C102:
- err = sn9c102_write_const_regs(cam, {0x01, 0x01},
- {0x00, 0x01}, {0x28, 0x17});
-
+ err = sn9c102_write_const_regs(cam, {0x01, 0x01}, {0x00, 0x01},
+ {0x28, 0x17});
break;
case BRIDGE_SN9C103: /* do _not_ change anything! */
- err = sn9c102_write_const_regs(cam, {0x09, 0x01},
- {0x42, 0x01}, {0x28, 0x17},
- {0x44, 0x02});
+ err = sn9c102_write_const_regs(cam, {0x09, 0x01}, {0x42, 0x01},
+ {0x28, 0x17}, {0x44, 0x02});
pid = sn9c102_i2c_try_read(cam, &ov7630, 0x0a);
- if (err || pid < 0) { /* try a different initialization */
- err = sn9c102_write_reg(cam, 0x01, 0x01);
- err += sn9c102_write_reg(cam, 0x00, 0x01);
- }
+ if (err || pid < 0) /* try a different initialization */
+ err += sn9c102_write_const_regs(cam, {0x01, 0x01},
+ {0x00, 0x01});
break;
default:
break;