V4L/DVB (5474): SN9C1xx driver updates
[linux-2.6.git] / drivers / media / video / sn9c102 / sn9c102_ov7630.c
index 7df09ff..ad9fb2c 100644 (file)
@@ -22,9 +22,6 @@
 #include "sn9c102_sensor.h"
 
 
-static struct sn9c102_sensor ov7630;
-
-
 static int ov7630_init(struct sn9c102_device* cam)
 {
        int err = 0;
@@ -32,21 +29,21 @@ static int ov7630_init(struct sn9c102_device* cam)
        switch (sn9c102_get_bridge(cam)) {
        case BRIDGE_SN9C101:
        case BRIDGE_SN9C102:
-       err += sn9c102_write_reg(cam, 0x00, 0x14);
-       err += sn9c102_write_reg(cam, 0x60, 0x17);
-       err += sn9c102_write_reg(cam, 0x0f, 0x18);
-       err += sn9c102_write_reg(cam, 0x50, 0x19);
+               err += sn9c102_write_reg(cam, 0x00, 0x14);
+               err += sn9c102_write_reg(cam, 0x60, 0x17);
+               err += sn9c102_write_reg(cam, 0x0f, 0x18);
+               err += sn9c102_write_reg(cam, 0x50, 0x19);
 
                err += sn9c102_i2c_write(cam, 0x12, 0x8d);
                err += sn9c102_i2c_write(cam, 0x12, 0x0d);
                err += sn9c102_i2c_write(cam, 0x11, 0x00);
-       err += sn9c102_i2c_write(cam, 0x15, 0x34);
-       err += sn9c102_i2c_write(cam, 0x16, 0x03);
-       err += sn9c102_i2c_write(cam, 0x17, 0x1c);
-       err += sn9c102_i2c_write(cam, 0x18, 0xbd);
-       err += sn9c102_i2c_write(cam, 0x19, 0x06);
-       err += sn9c102_i2c_write(cam, 0x1a, 0xf6);
-       err += sn9c102_i2c_write(cam, 0x1b, 0x04);
+               err += sn9c102_i2c_write(cam, 0x15, 0x35);
+               err += sn9c102_i2c_write(cam, 0x16, 0x03);
+               err += sn9c102_i2c_write(cam, 0x17, 0x1c);
+               err += sn9c102_i2c_write(cam, 0x18, 0xbd);
+               err += sn9c102_i2c_write(cam, 0x19, 0x06);
+               err += sn9c102_i2c_write(cam, 0x1a, 0xf6);
+               err += sn9c102_i2c_write(cam, 0x1b, 0x04);
                err += sn9c102_i2c_write(cam, 0x20, 0x44);
                err += sn9c102_i2c_write(cam, 0x23, 0xee);
                err += sn9c102_i2c_write(cam, 0x26, 0xa0);
@@ -108,23 +105,23 @@ static int ov7630_init(struct sn9c102_device* cam)
                err += sn9c102_i2c_write(cam, 0x11, 0x01);
                err += sn9c102_i2c_write(cam, 0x1b, 0x04);
                err += sn9c102_i2c_write(cam, 0x20, 0x44);
-       err += sn9c102_i2c_write(cam, 0x23, 0xee);
-       err += sn9c102_i2c_write(cam, 0x26, 0xa0);
-       err += sn9c102_i2c_write(cam, 0x27, 0x9a);
+               err += sn9c102_i2c_write(cam, 0x23, 0xee);
+               err += sn9c102_i2c_write(cam, 0x26, 0xa0);
+               err += sn9c102_i2c_write(cam, 0x27, 0x9a);
                err += sn9c102_i2c_write(cam, 0x28, 0x20);
-       err += sn9c102_i2c_write(cam, 0x29, 0x30);
-       err += sn9c102_i2c_write(cam, 0x2f, 0x3d);
-       err += sn9c102_i2c_write(cam, 0x30, 0x24);
-       err += sn9c102_i2c_write(cam, 0x32, 0x86);
-       err += sn9c102_i2c_write(cam, 0x60, 0xa9);
-       err += sn9c102_i2c_write(cam, 0x61, 0x42);
-       err += sn9c102_i2c_write(cam, 0x65, 0x00);
-       err += sn9c102_i2c_write(cam, 0x69, 0x38);
-       err += sn9c102_i2c_write(cam, 0x6f, 0x88);
-       err += sn9c102_i2c_write(cam, 0x70, 0x0b);
-       err += sn9c102_i2c_write(cam, 0x71, 0x00);
-       err += sn9c102_i2c_write(cam, 0x74, 0x21);
-       err += sn9c102_i2c_write(cam, 0x7d, 0xf7);
+               err += sn9c102_i2c_write(cam, 0x29, 0x30);
+               err += sn9c102_i2c_write(cam, 0x2f, 0x3d);
+               err += sn9c102_i2c_write(cam, 0x30, 0x24);
+               err += sn9c102_i2c_write(cam, 0x32, 0x86);
+               err += sn9c102_i2c_write(cam, 0x60, 0xa9);
+               err += sn9c102_i2c_write(cam, 0x61, 0x42);
+               err += sn9c102_i2c_write(cam, 0x65, 0x00);
+               err += sn9c102_i2c_write(cam, 0x69, 0x38);
+               err += sn9c102_i2c_write(cam, 0x6f, 0x88);
+               err += sn9c102_i2c_write(cam, 0x70, 0x0b);
+               err += sn9c102_i2c_write(cam, 0x71, 0x00);
+               err += sn9c102_i2c_write(cam, 0x74, 0x21);
+               err += sn9c102_i2c_write(cam, 0x7d, 0xf7);
                break;
        default:
                break;
@@ -428,9 +425,9 @@ int sn9c102_probe_ov7630(struct sn9c102_device* cam)
        switch (sn9c102_get_bridge(cam)) {
        case BRIDGE_SN9C101:
        case BRIDGE_SN9C102:
-       err += sn9c102_write_reg(cam, 0x01, 0x01);
-       err += sn9c102_write_reg(cam, 0x00, 0x01);
-       err += sn9c102_write_reg(cam, 0x28, 0x17);
+               err += sn9c102_write_reg(cam, 0x01, 0x01);
+               err += sn9c102_write_reg(cam, 0x00, 0x01);
+               err += sn9c102_write_reg(cam, 0x28, 0x17);
                break;
        case BRIDGE_SN9C103: /* do _not_ change anything! */
                err += sn9c102_write_reg(cam, 0x09, 0x01);