V4L/DVB (12988): gspca - m5602-ov7660: Remove old init
authorErik Andrén <erik.andren@gmail.com>
Fri, 26 Jun 2009 12:20:04 +0000 (09:20 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 19 Sep 2009 03:17:46 +0000 (00:17 -0300)
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/m5602/m5602_ov7660.c
drivers/media/video/gspca/m5602/m5602_ov7660.h

index 9b5e105327961733722266322e3b8c60374c0777..9648b90eec7356ae16e9925a00d4eab4188ae89e 100644 (file)
@@ -244,17 +244,17 @@ int ov7660_init(struct sd *sd)
        s32 *sensor_settings = sd->sensor_priv;
 
        /* Init the sensor */
-       for (i = 0; i < ARRAY_SIZE(init2_ov7660); i++) {
+       for (i = 0; i < ARRAY_SIZE(init_ov7660); i++) {
                u8 data[2];
 
-               if (init2_ov7660[i][0] == BRIDGE) {
+               if (init_ov7660[i][0] == BRIDGE) {
                        err = m5602_write_bridge(sd,
-                               init2_ov7660[i][1],
-                               init2_ov7660[i][2]);
+                               init_ov7660[i][1],
+                               init_ov7660[i][2]);
                } else {
-                       data[0] = init2_ov7660[i][2];
+                       data[0] = init_ov7660[i][2];
                        err = m5602_write_sensor(sd,
-                               init2_ov7660[i][1], data, 1);
+                               init_ov7660[i][1], data, 1);
                }
        }
 
index 2ce05039b0376d1be4f9c0ddf9ce6cb525cff425..3360aaec2578ae370e90cb20dad252ca05d4f3b4 100644 (file)
@@ -142,135 +142,6 @@ static const unsigned char preinit_ov7660[][4] =
 
 static const unsigned char init_ov7660[][4] =
 {
-       {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
-       {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-       {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
-       {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d},
-       {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x03},
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x03},
-       {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
-       {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
-
-       {SENSOR, OV7660_OFON, 0x0c},
-       {SENSOR, OV7660_COM2, 0x11},
-       {SENSOR, OV7660_COM7, 0x05},
-
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
-       {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
-       {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-       {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
-       {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
-       {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
-       {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
-
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x02},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-
-       {SENSOR, OV7660_AECH, OV7660_DEFAULT_EXPOSURE},
-       {SENSOR, OV7660_COM1, 0x00},
-
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
-       {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
-       {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-       {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
-       {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
-       {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
-       {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
-
-       {SENSOR, OV7660_COM7, 0x80},
-       {SENSOR, OV7660_CLKRC, 0x80},
-       {SENSOR, OV7660_COM9, 0x4c},
-       {SENSOR, OV7660_OFON, 0x43},
-       {SENSOR, OV7660_COM12, 0x28},
-       {SENSOR, OV7660_COM8, 0x00},
-       {SENSOR, OV7660_COM10, 0x40},
-       {SENSOR, OV7660_HSTART, 0x0c},
-       {SENSOR, OV7660_HSTOP, 0x61},
-       {SENSOR, OV7660_HREF, 0xa4},
-       {SENSOR, OV7660_PSHFT, 0x0b},
-       {SENSOR, OV7660_VSTART, 0x01},
-       {SENSOR, OV7660_VSTOP, 0x7a},
-       {SENSOR, OV7660_VREF, 0x00},
-       {SENSOR, OV7660_COM7, 0x05},
-       {SENSOR, OV7660_COM6, 0x4b},
-       {SENSOR, OV7660_BBIAS, 0x98},
-       {SENSOR, OV7660_GbBIAS, 0x98},
-       {SENSOR, OV7660_RSVD29, 0x98},
-       {SENSOR, OV7660_RBIAS, 0x98},
-       {SENSOR, OV7660_COM1, 0x00},
-       {SENSOR, OV7660_AECHH, 0x00},
-       {SENSOR, OV7660_ADC, 0x04},
-       {SENSOR, OV7660_COM13, 0x00},
-       {SENSOR, OV7660_RSVDA1, 0x23},
-       {SENSOR, OV7660_TSLB, 0x0d},
-       {SENSOR, OV7660_HV, 0x80},
-       {SENSOR, OV7660_LCC1, 0x00},
-       {SENSOR, OV7660_LCC2, 0x00},
-       {SENSOR, OV7660_LCC3, 0x10},
-       {SENSOR, OV7660_LCC4, 0x40},
-       {SENSOR, OV7660_LCC5, 0x01},
-
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-       {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
-       {BRIDGE, M5602_XB_SENSOR_TYPE, 0x0c},
-       {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81},
-       {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
-       {BRIDGE, M5602_XB_SIG_INI, 0x01},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x08},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x01},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0xe0}, /* 480 */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_SIG_INI, 0x00},
-       {BRIDGE, M5602_XB_SIG_INI, 0x02},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x00},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x27}, /* 39 */
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0x02},
-       {BRIDGE, M5602_XB_VSYNC_PARA, 0xa7}, /* 679 */
-       {BRIDGE, M5602_XB_SIG_INI, 0x00},
-
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
-
-       {SENSOR, OV7660_COM1, 0x00},
-       {SENSOR, OV7660_OFON, 0x0c},
-       {SENSOR, OV7660_COM2, 0x11}, /* Soft sleep, 2x Drive */
-       {SENSOR, OV7660_COM7, 0x05}, /* Raw RGB */
-
-       {BRIDGE, M5602_XB_GPIO_DIR, 0x01},
-       {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
-       {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
-       {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
-       {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x08},
-       {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}
-};
-
-static const unsigned char init2_ov7660[][4] = {
        {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
        {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
        {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},