summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2012-03-19 04:33:30 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-19 22:29:52 -0300
commit92884f80b7e5f8d0ffd725a251c81dd45e9e6eb0 (patch)
tree334a522e395635144e9e6b3a262b9c65ceae03df /drivers/media
parentfe86ec75b992a6bb56955ac61c2cfdcbbde0d809 (diff)
downloadlinux-92884f80b7e5f8d0ffd725a251c81dd45e9e6eb0.tar.gz
linux-92884f80b7e5f8d0ffd725a251c81dd45e9e6eb0.tar.bz2
linux-92884f80b7e5f8d0ffd725a251c81dd45e9e6eb0.zip
[media] gspca - sn9c20x: Add a delay after Omnivision sensor reset
The reset of the Omnivision sensors takes a long time (200ms). Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/sn9c20x.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c
index 15c371e4f8d6..97c653f9f983 100644
--- a/drivers/media/video/gspca/sn9c20x.c
+++ b/drivers/media/video/gspca/sn9c20x.c
@@ -825,7 +825,7 @@ static u8 hv7131r_gain[] = {
};
static struct i2c_reg_u8 soi968_init[] = {
- {0x12, 0x80}, {0x0c, 0x00}, {0x0f, 0x1f},
+ {0x0c, 0x00}, {0x0f, 0x1f},
{0x11, 0x80}, {0x38, 0x52}, {0x1e, 0x00},
{0x33, 0x08}, {0x35, 0x8c}, {0x36, 0x0c},
{0x37, 0x04}, {0x45, 0x04}, {0x47, 0xff},
@@ -851,7 +851,7 @@ static struct i2c_reg_u8 ov7660_init[] = {
};
static struct i2c_reg_u8 ov7670_init[] = {
- {0x12, 0x80}, {0x11, 0x80}, {0x3a, 0x04}, {0x12, 0x01},
+ {0x11, 0x80}, {0x3a, 0x04}, {0x12, 0x01},
{0x32, 0xb6}, {0x03, 0x0a}, {0x0c, 0x00}, {0x3e, 0x00},
{0x70, 0x3a}, {0x71, 0x35}, {0x72, 0x11}, {0x73, 0xf0},
{0xa2, 0x02}, {0x13, 0xe0}, {0x00, 0x00}, {0x10, 0x00},
@@ -908,7 +908,7 @@ static struct i2c_reg_u8 ov7670_init[] = {
};
static struct i2c_reg_u8 ov9650_init[] = {
- {0x12, 0x80}, {0x00, 0x00}, {0x01, 0x78},
+ {0x00, 0x00}, {0x01, 0x78},
{0x02, 0x78}, {0x03, 0x36}, {0x04, 0x03},
{0x05, 0x00}, {0x06, 0x00}, {0x08, 0x00},
{0x09, 0x01}, {0x0c, 0x00}, {0x0d, 0x00},
@@ -938,7 +938,7 @@ static struct i2c_reg_u8 ov9650_init[] = {
};
static struct i2c_reg_u8 ov9655_init[] = {
- {0x12, 0x80}, {0x0e, 0x61}, {0x11, 0x80}, {0x13, 0xba},
+ {0x0e, 0x61}, {0x11, 0x80}, {0x13, 0xba},
{0x14, 0x2e}, {0x16, 0x24}, {0x1e, 0x04}, {0x27, 0x08},
{0x28, 0x08}, {0x29, 0x15}, {0x2c, 0x08}, {0x34, 0x3d},
{0x35, 0x00}, {0x38, 0x12}, {0x0f, 0x42}, {0x39, 0x57},
@@ -1233,6 +1233,8 @@ static void ov9650_init_sensor(struct gspca_dev *gspca_dev)
return;
}
+ i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */
+ msleep(200);
for (i = 0; i < ARRAY_SIZE(ov9650_init); i++) {
i2c_w1(gspca_dev, ov9650_init[i].reg,
ov9650_init[i].val);
@@ -1250,6 +1252,8 @@ static void ov9655_init_sensor(struct gspca_dev *gspca_dev)
int i;
struct sd *sd = (struct sd *) gspca_dev;
+ i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */
+ msleep(200);
for (i = 0; i < ARRAY_SIZE(ov9655_init); i++) {
i2c_w1(gspca_dev, ov9655_init[i].reg,
ov9655_init[i].val);
@@ -1269,6 +1273,8 @@ static void soi968_init_sensor(struct gspca_dev *gspca_dev)
int i;
struct sd *sd = (struct sd *) gspca_dev;
+ i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */
+ msleep(200);
for (i = 0; i < ARRAY_SIZE(soi968_init); i++) {
i2c_w1(gspca_dev, soi968_init[i].reg,
soi968_init[i].val);
@@ -1289,6 +1295,8 @@ static void ov7660_init_sensor(struct gspca_dev *gspca_dev)
int i;
struct sd *sd = (struct sd *) gspca_dev;
+ i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */
+ msleep(200);
for (i = 0; i < ARRAY_SIZE(ov7660_init); i++) {
i2c_w1(gspca_dev, ov7660_init[i].reg,
ov7660_init[i].val);
@@ -1306,6 +1314,8 @@ static void ov7670_init_sensor(struct gspca_dev *gspca_dev)
int i;
struct sd *sd = (struct sd *) gspca_dev;
+ i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */
+ msleep(200);
for (i = 0; i < ARRAY_SIZE(ov7670_init); i++) {
i2c_w1(gspca_dev, ov7670_init[i].reg,
ov7670_init[i].val);