Commit bf40b382 authored by Erik Andrén's avatar Erik Andrén Committed by Mauro Carvalho Chehab

V4L/DVB (12984): gspca - m5602-ov7660: Use a new raw init

Signed-off-by: default avatarErik Andrén <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 7c7ddf16
......@@ -211,17 +211,17 @@ int ov7660_init(struct sd *sd)
s32 *sensor_settings = sd->sensor_priv;
/* Init the sensor */
for (i = 0; i < ARRAY_SIZE(init_ov7660); i++) {
for (i = 0; i < ARRAY_SIZE(init2_ov7660); i++) {
u8 data[2];
if (init_ov7660[i][0] == BRIDGE) {
if (init2_ov7660[i][0] == BRIDGE) {
err = m5602_write_bridge(sd,
init_ov7660[i][1],
init_ov7660[i][2]);
init2_ov7660[i][1],
init2_ov7660[i][2]);
} else {
data[0] = init_ov7660[i][2];
data[0] = init2_ov7660[i][2];
err = m5602_write_sensor(sd,
init_ov7660[i][1], data, 1);
init2_ov7660[i][1], data, 1);
}
}
......
......@@ -270,4 +270,252 @@ static const unsigned char init_ov7660[][4] =
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0}
};
static const unsigned char init2_ov7660[][4] = {
{BRIDGE, 0x13, 0x02},
{BRIDGE, 0x12, 0xb0},
{BRIDGE, 0x15, 0x00},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0d},
{BRIDGE, 0x01, 0x00},
{BRIDGE, 0x77, 0x01},
{BRIDGE, 0x77, 0x01},
{BRIDGE, 0x15, 0x00},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0c},
{BRIDGE, 0x77, 0x05},
{BRIDGE, 0x76, 0x00},
{BRIDGE, 0x74, 0x06},
{BRIDGE, 0x75, 0x00},
{SENSOR, 0x12, 0x80},
{SENSOR, 0x11, 0x80},
{SENSOR, 0x01, 0x80},
{SENSOR, 0x02, 0x80},
{SENSOR, 0x14, 0x4c},
{SENSOR, 0x39, 0x43},
{SENSOR, 0x3c, 0x28},
{SENSOR, 0x13, 0x00},
{SENSOR, 0x15, 0x40},
{SENSOR, 0x17, 0x0c},
{SENSOR, 0x18, 0x61},
{SENSOR, 0x32, 0xa4},
{SENSOR, 0x1b, 0x0b},
{SENSOR, 0x19, 0x01},
{SENSOR, 0x1a, 0x7a},
{SENSOR, 0x03, 0x00},
{SENSOR, 0x12, 0x05},
{SENSOR, 0x0f, 0x42},
{SENSOR, 0x27, 0x94},
{SENSOR, 0x28, 0x94},
{SENSOR, 0x29, 0x94},
{SENSOR, 0x2c, 0x94},
{SENSOR, 0x04, 0x00},
{SENSOR, 0x10, 0x00},
{SENSOR, 0x07, 0x00},
{SENSOR, 0x37, 0x05},
{SENSOR, 0x3d, 0x00},
{SENSOR, 0xa1, 0x23},
{SENSOR, 0x3a, 0x0d},
{SENSOR, 0x69, 0x80},
{SENSOR, 0x62, 0x00},
{SENSOR, 0x63, 0x00},
{SENSOR, 0x64, 0x10},
{SENSOR, 0x65, 0x40},
{SENSOR, 0x66, 0x01},
{BRIDGE, 0x15, 0x06},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0c},
{BRIDGE, 0x02, 0x81},
{BRIDGE, 0x04, 0x82},
{BRIDGE, 0x0a, 0x01},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x08},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x01},
{BRIDGE, 0x06, 0xec},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x0a, 0x00},
{BRIDGE, 0x0a, 0x02},
{BRIDGE, 0x07, 0x00},
{BRIDGE, 0x07, 0x27},
{BRIDGE, 0x07, 0x02},
{BRIDGE, 0x07, 0xae},
{BRIDGE, 0x0a, 0x00},
{SENSOR, 0x01, 0x80},
{SENSOR, 0x02, 0x80},
{BRIDGE, 0x15, 0x02},
{BRIDGE, 0x14, 0xb0},
{SENSOR, 0x10, 0x20},
{SENSOR, 0x04, 0x00},
{SENSOR, 0x00, 0x07},
{SENSOR, 0x39, 0x0c},
{SENSOR, 0x09, 0x11},
{SENSOR, 0x12, 0x05},
{BRIDGE, 0x77, 0x01},
{BRIDGE, 0x76, 0x04},
{BRIDGE, 0x74, 0x06},
{BRIDGE, 0x72, 0x06},
{BRIDGE, 0x70, 0x00},
{BRIDGE, 0x15, 0x08},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x15, 0x00},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0c},
{BRIDGE, 0x77, 0x05},
{BRIDGE, 0x76, 0x00},
{BRIDGE, 0x74, 0x06},
{BRIDGE, 0x75, 0x00},
{SENSOR, 0x12, 0x80},
{SENSOR, 0x11, 0x80},
{SENSOR, 0x01, 0x80},
{SENSOR, 0x02, 0x80},
{SENSOR, 0x14, 0x4c},
{SENSOR, 0x39, 0x43},
{SENSOR, 0x3c, 0x28},
{SENSOR, 0x13, 0x00},
{SENSOR, 0x15, 0x40},
{SENSOR, 0x17, 0x0c},
{SENSOR, 0x18, 0x61},
{SENSOR, 0x32, 0xa4},
{SENSOR, 0x1b, 0x0b},
{SENSOR, 0x19, 0x01},
{SENSOR, 0x1a, 0x7a},
{SENSOR, 0x03, 0x00},
{SENSOR, 0x12, 0x05},
{SENSOR, 0x0f, 0x42},
{SENSOR, 0x27, 0x94},
{SENSOR, 0x28, 0x94},
{SENSOR, 0x29, 0x94},
{SENSOR, 0x2c, 0x94},
{SENSOR, 0x04, 0x00},
{SENSOR, 0x10, 0x00},
{SENSOR, 0x07, 0x00},
{SENSOR, 0x37, 0x05},
{SENSOR, 0x3d, 0x00},
{SENSOR, 0xa1, 0x23},
{SENSOR, 0x3a, 0x0d},
{SENSOR, 0x69, 0x80},
{SENSOR, 0x62, 0x00},
{SENSOR, 0x63, 0x00},
{SENSOR, 0x64, 0x10},
{SENSOR, 0x65, 0x40},
{SENSOR, 0x66, 0x01},
{BRIDGE, 0x15, 0x06},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0c},
{BRIDGE, 0x02, 0x81},
{BRIDGE, 0x04, 0x82},
{BRIDGE, 0x0a, 0x01},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x08},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x01},
{BRIDGE, 0x06, 0xec},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x0a, 0x00},
{BRIDGE, 0x0a, 0x02},
{BRIDGE, 0x07, 0x00},
{BRIDGE, 0x07, 0x27},
{BRIDGE, 0x07, 0x02},
{BRIDGE, 0x07, 0xae},
{BRIDGE, 0x0a, 0x00},
{SENSOR, 0x01, 0x80},
{SENSOR, 0x02, 0x80},
{BRIDGE, 0x15, 0x00},
{BRIDGE, 0x14, 0xb0},
{SENSOR, 0x10, 0x5f},
{SENSOR, 0x04, 0x03},
{SENSOR, 0x00, 0x02},
{SENSOR, 0x39, 0x0c},
{SENSOR, 0x09, 0x11},
{SENSOR, 0x12, 0x05},
{BRIDGE, 0x77, 0x01},
{BRIDGE, 0x76, 0x04},
{BRIDGE, 0x74, 0x06},
{BRIDGE, 0x72, 0x06},
{BRIDGE, 0x70, 0x00},
{BRIDGE, 0x15, 0x08},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x15, 0x00},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0c},
{BRIDGE, 0x77, 0x05},
{BRIDGE, 0x76, 0x00},
{BRIDGE, 0x74, 0x06},
{BRIDGE, 0x75, 0x00},
{SENSOR, 0x12, 0x80},
{SENSOR, 0x11, 0x80},
{SENSOR, 0x01, 0x80},
{SENSOR, 0x02, 0x80},
{SENSOR, 0x14, 0x4c},
{SENSOR, 0x39, 0x43},
{SENSOR, 0x3c, 0x28},
{SENSOR, 0x13, 0x00},
{SENSOR, 0x15, 0x40},
{SENSOR, 0x17, 0x0c},
{SENSOR, 0x18, 0x61},
{SENSOR, 0x32, 0xa4},
{SENSOR, 0x1b, 0x0b},
{SENSOR, 0x19, 0x01},
{SENSOR, 0x1a, 0x7a},
{SENSOR, 0x03, 0x00},
{SENSOR, 0x12, 0x05},
{SENSOR, 0x0f, 0x42},
{SENSOR, 0x27, 0x94},
{SENSOR, 0x28, 0x94},
{SENSOR, 0x29, 0x94},
{SENSOR, 0x2c, 0x94},
{SENSOR, 0x04, 0x00},
{SENSOR, 0x10, 0x00},
{SENSOR, 0x07, 0x00},
{SENSOR, 0x37, 0x05},
{SENSOR, 0x3d, 0x00},
{SENSOR, 0xa1, 0x23},
{SENSOR, 0x3a, 0x0d},
{SENSOR, 0x69, 0x80},
{SENSOR, 0x62, 0x00},
{SENSOR, 0x63, 0x00},
{SENSOR, 0x64, 0x10},
{SENSOR, 0x65, 0x40},
{SENSOR, 0x66, 0x01},
{BRIDGE, 0x15, 0x06},
{BRIDGE, 0x14, 0xb0},
{BRIDGE, 0x60, 0xc0},
{BRIDGE, 0x00, 0x0c},
{BRIDGE, 0x02, 0x81},
{BRIDGE, 0x04, 0x82},
{BRIDGE, 0x0a, 0x01},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x08},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x01},
{BRIDGE, 0x06, 0xec},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x06, 0x00},
{BRIDGE, 0x0a, 0x00},
{BRIDGE, 0x0a, 0x02},
{BRIDGE, 0x07, 0x00},
{BRIDGE, 0x07, 0x27},
{BRIDGE, 0x07, 0x02},
{BRIDGE, 0x07, 0xae},
{BRIDGE, 0x0a, 0x00},
{SENSOR, 0x01, 0x80},
{SENSOR, 0x02, 0x80},
{BRIDGE, 0x15, 0x00},
{BRIDGE, 0x14, 0xb0},
{SENSOR, 0x10, 0x5f},
{SENSOR, 0x04, 0x03},
{SENSOR, 0x00, 0x02}
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment