tree-wide: fix assorted typos all over the place
[safe/jmp/linux-2.6] / drivers / media / video / gspca / sn9c20x.c
index 20b03a0..cdad3db 100644 (file)
@@ -1036,10 +1036,10 @@ static struct i2c_reg_u16 mt9m001_init[] = {
 };
 
 static struct i2c_reg_u16 mt9m111_init[] = {
-       {0xf0, 0x0000}, {0x0d, 0x0008}, {0x0d, 0x0009},
-       {0x0d, 0x0008}, {0xf0, 0x0001}, {0x3a, 0x4300},
-       {0x9b, 0x4300}, {0xa1, 0x0280}, {0xa4, 0x0200},
-       {0x06, 0x308e}, {0xf0, 0x0000},
+       {0xf0, 0x0000}, {0x0d, 0x0021}, {0x0d, 0x0008},
+       {0xf0, 0x0001}, {0x3a, 0x4300}, {0x9b, 0x4300},
+       {0x06, 0x708e}, {0xf0, 0x0002}, {0x2e, 0x0a1e},
+       {0xf0, 0x0000},
 };
 
 static struct i2c_reg_u8 hv7131r_init[] = {
@@ -1379,6 +1379,7 @@ static int mt9m111_init_sensor(struct gspca_dev *gspca_dev)
                        return -ENODEV;
                }
        }
+       gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) | (1 << GAIN_IDX);
        sd->hstart = 0;
        sd->vstart = 2;
        return 0;
@@ -1641,7 +1642,6 @@ static int set_exposure(struct gspca_dev *gspca_dev)
                exp[4] = sd->exposure >> 8;
                break;
        case SENSOR_MT9M001:
-       case SENSOR_MT9M111:
        case SENSOR_MT9V112:
        case SENSOR_MT9V111:
        case SENSOR_MT9V011:
@@ -1685,7 +1685,6 @@ static int set_gain(struct gspca_dev *gspca_dev)
                gain[4] = micron1_gain[sd->gain] & 0xff;
                break;
        case SENSOR_MT9V112:
-       case SENSOR_MT9M111:
                gain[0] |= (3 << 4);
                gain[2] = 0x2f;
                gain[3] = micron1_gain[sd->gain] >> 8;
@@ -2006,7 +2005,9 @@ static int sd_config(struct gspca_dev *gspca_dev,
        sd->i2c_addr = id->driver_info & 0xff;
 
        switch (sd->sensor) {
+       case SENSOR_MT9M111:
        case SENSOR_OV9650:
+       case SENSOR_SOI968:
                cam->cam_mode = sxga_mode;
                cam->nmodes = ARRAY_SIZE(sxga_mode);
                break;
@@ -2122,6 +2123,25 @@ static void configure_sensor_output(struct gspca_dev *gspca_dev, int mode)
        struct sd *sd = (struct sd *) gspca_dev;
        u8 value;
        switch (sd->sensor) {
+       case SENSOR_SOI968:
+               if (mode & MODE_SXGA) {
+                       i2c_w1(gspca_dev, 0x17, 0x1d);
+                       i2c_w1(gspca_dev, 0x18, 0xbd);
+                       i2c_w1(gspca_dev, 0x19, 0x01);
+                       i2c_w1(gspca_dev, 0x1a, 0x81);
+                       i2c_w1(gspca_dev, 0x12, 0x00);
+                       sd->hstart = 140;
+                       sd->vstart = 19;
+               } else {
+                       i2c_w1(gspca_dev, 0x17, 0x13);
+                       i2c_w1(gspca_dev, 0x18, 0x63);
+                       i2c_w1(gspca_dev, 0x19, 0x01);
+                       i2c_w1(gspca_dev, 0x1a, 0x79);
+                       i2c_w1(gspca_dev, 0x12, 0x40);
+                       sd->hstart = 60;
+                       sd->vstart = 11;
+               }
+               break;
        case SENSOR_OV9650:
                if (mode & MODE_SXGA) {
                        i2c_w1(gspca_dev, 0x17, 0x1b);
@@ -2139,6 +2159,17 @@ static void configure_sensor_output(struct gspca_dev *gspca_dev, int mode)
                        i2c_w1(gspca_dev, 0x12, (value & 0x7) | 0x40);
                }
                break;
+       case SENSOR_MT9M111:
+               if (mode & MODE_SXGA) {
+                       i2c_w2(gspca_dev, 0xf0, 0x0002);
+                       i2c_w2(gspca_dev, 0xc8, 0x970b);
+                       i2c_w2(gspca_dev, 0xf0, 0x0000);
+               } else {
+                       i2c_w2(gspca_dev, 0xf0, 0x0002);
+                       i2c_w2(gspca_dev, 0xc8, 0x8000);
+                       i2c_w2(gspca_dev, 0xf0, 0x0000);
+               }
+               break;
        }
 }