Skip to content

Commit

Permalink
V4L/DVB (12984): gspca - m5602-ov7660: Use a new raw init
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Erik Andrén authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 7c7ddf1 commit bf40b38
Show file tree
Hide file tree
Showing 2 changed files with 254 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/media/video/gspca/m5602/m5602_ov7660.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
248 changes: 248 additions & 0 deletions drivers/media/video/gspca/m5602/m5602_ov7660.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bf40b38

Please sign in to comment.