diff options
author | Jean-François Moine <moinejf@free.fr> | 2012-03-19 03:33:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-03-19 21:29:52 -0400 |
commit | 92884f80b7e5f8d0ffd725a251c81dd45e9e6eb0 (patch) | |
tree | 334a522e395635144e9e6b3a262b9c65ceae03df /drivers/media | |
parent | fe86ec75b992a6bb56955ac61c2cfdcbbde0d809 (diff) |
[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.c | 18 |
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[] = { | |||
825 | }; | 825 | }; |
826 | 826 | ||
827 | static struct i2c_reg_u8 soi968_init[] = { | 827 | static struct i2c_reg_u8 soi968_init[] = { |
828 | {0x12, 0x80}, {0x0c, 0x00}, {0x0f, 0x1f}, | 828 | {0x0c, 0x00}, {0x0f, 0x1f}, |
829 | {0x11, 0x80}, {0x38, 0x52}, {0x1e, 0x00}, | 829 | {0x11, 0x80}, {0x38, 0x52}, {0x1e, 0x00}, |
830 | {0x33, 0x08}, {0x35, 0x8c}, {0x36, 0x0c}, | 830 | {0x33, 0x08}, {0x35, 0x8c}, {0x36, 0x0c}, |
831 | {0x37, 0x04}, {0x45, 0x04}, {0x47, 0xff}, | 831 | {0x37, 0x04}, {0x45, 0x04}, {0x47, 0xff}, |
@@ -851,7 +851,7 @@ static struct i2c_reg_u8 ov7660_init[] = { | |||
851 | }; | 851 | }; |
852 | 852 | ||
853 | static struct i2c_reg_u8 ov7670_init[] = { | 853 | static struct i2c_reg_u8 ov7670_init[] = { |
854 | {0x12, 0x80}, {0x11, 0x80}, {0x3a, 0x04}, {0x12, 0x01}, | 854 | {0x11, 0x80}, {0x3a, 0x04}, {0x12, 0x01}, |
855 | {0x32, 0xb6}, {0x03, 0x0a}, {0x0c, 0x00}, {0x3e, 0x00}, | 855 | {0x32, 0xb6}, {0x03, 0x0a}, {0x0c, 0x00}, {0x3e, 0x00}, |
856 | {0x70, 0x3a}, {0x71, 0x35}, {0x72, 0x11}, {0x73, 0xf0}, | 856 | {0x70, 0x3a}, {0x71, 0x35}, {0x72, 0x11}, {0x73, 0xf0}, |
857 | {0xa2, 0x02}, {0x13, 0xe0}, {0x00, 0x00}, {0x10, 0x00}, | 857 | {0xa2, 0x02}, {0x13, 0xe0}, {0x00, 0x00}, {0x10, 0x00}, |
@@ -908,7 +908,7 @@ static struct i2c_reg_u8 ov7670_init[] = { | |||
908 | }; | 908 | }; |
909 | 909 | ||
910 | static struct i2c_reg_u8 ov9650_init[] = { | 910 | static struct i2c_reg_u8 ov9650_init[] = { |
911 | {0x12, 0x80}, {0x00, 0x00}, {0x01, 0x78}, | 911 | {0x00, 0x00}, {0x01, 0x78}, |
912 | {0x02, 0x78}, {0x03, 0x36}, {0x04, 0x03}, | 912 | {0x02, 0x78}, {0x03, 0x36}, {0x04, 0x03}, |
913 | {0x05, 0x00}, {0x06, 0x00}, {0x08, 0x00}, | 913 | {0x05, 0x00}, {0x06, 0x00}, {0x08, 0x00}, |
914 | {0x09, 0x01}, {0x0c, 0x00}, {0x0d, 0x00}, | 914 | {0x09, 0x01}, {0x0c, 0x00}, {0x0d, 0x00}, |
@@ -938,7 +938,7 @@ static struct i2c_reg_u8 ov9650_init[] = { | |||
938 | }; | 938 | }; |
939 | 939 | ||
940 | static struct i2c_reg_u8 ov9655_init[] = { | 940 | static struct i2c_reg_u8 ov9655_init[] = { |
941 | {0x12, 0x80}, {0x0e, 0x61}, {0x11, 0x80}, {0x13, 0xba}, | 941 | {0x0e, 0x61}, {0x11, 0x80}, {0x13, 0xba}, |
942 | {0x14, 0x2e}, {0x16, 0x24}, {0x1e, 0x04}, {0x27, 0x08}, | 942 | {0x14, 0x2e}, {0x16, 0x24}, {0x1e, 0x04}, {0x27, 0x08}, |
943 | {0x28, 0x08}, {0x29, 0x15}, {0x2c, 0x08}, {0x34, 0x3d}, | 943 | {0x28, 0x08}, {0x29, 0x15}, {0x2c, 0x08}, {0x34, 0x3d}, |
944 | {0x35, 0x00}, {0x38, 0x12}, {0x0f, 0x42}, {0x39, 0x57}, | 944 | {0x35, 0x00}, {0x38, 0x12}, {0x0f, 0x42}, {0x39, 0x57}, |
@@ -1233,6 +1233,8 @@ static void ov9650_init_sensor(struct gspca_dev *gspca_dev) | |||
1233 | return; | 1233 | return; |
1234 | } | 1234 | } |
1235 | 1235 | ||
1236 | i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */ | ||
1237 | msleep(200); | ||
1236 | for (i = 0; i < ARRAY_SIZE(ov9650_init); i++) { | 1238 | for (i = 0; i < ARRAY_SIZE(ov9650_init); i++) { |
1237 | i2c_w1(gspca_dev, ov9650_init[i].reg, | 1239 | i2c_w1(gspca_dev, ov9650_init[i].reg, |
1238 | ov9650_init[i].val); | 1240 | ov9650_init[i].val); |
@@ -1250,6 +1252,8 @@ static void ov9655_init_sensor(struct gspca_dev *gspca_dev) | |||
1250 | int i; | 1252 | int i; |
1251 | struct sd *sd = (struct sd *) gspca_dev; | 1253 | struct sd *sd = (struct sd *) gspca_dev; |
1252 | 1254 | ||
1255 | i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */ | ||
1256 | msleep(200); | ||
1253 | for (i = 0; i < ARRAY_SIZE(ov9655_init); i++) { | 1257 | for (i = 0; i < ARRAY_SIZE(ov9655_init); i++) { |
1254 | i2c_w1(gspca_dev, ov9655_init[i].reg, | 1258 | i2c_w1(gspca_dev, ov9655_init[i].reg, |
1255 | ov9655_init[i].val); | 1259 | ov9655_init[i].val); |
@@ -1269,6 +1273,8 @@ static void soi968_init_sensor(struct gspca_dev *gspca_dev) | |||
1269 | int i; | 1273 | int i; |
1270 | struct sd *sd = (struct sd *) gspca_dev; | 1274 | struct sd *sd = (struct sd *) gspca_dev; |
1271 | 1275 | ||
1276 | i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */ | ||
1277 | msleep(200); | ||
1272 | for (i = 0; i < ARRAY_SIZE(soi968_init); i++) { | 1278 | for (i = 0; i < ARRAY_SIZE(soi968_init); i++) { |
1273 | i2c_w1(gspca_dev, soi968_init[i].reg, | 1279 | i2c_w1(gspca_dev, soi968_init[i].reg, |
1274 | soi968_init[i].val); | 1280 | soi968_init[i].val); |
@@ -1289,6 +1295,8 @@ static void ov7660_init_sensor(struct gspca_dev *gspca_dev) | |||
1289 | int i; | 1295 | int i; |
1290 | struct sd *sd = (struct sd *) gspca_dev; | 1296 | struct sd *sd = (struct sd *) gspca_dev; |
1291 | 1297 | ||
1298 | i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */ | ||
1299 | msleep(200); | ||
1292 | for (i = 0; i < ARRAY_SIZE(ov7660_init); i++) { | 1300 | for (i = 0; i < ARRAY_SIZE(ov7660_init); i++) { |
1293 | i2c_w1(gspca_dev, ov7660_init[i].reg, | 1301 | i2c_w1(gspca_dev, ov7660_init[i].reg, |
1294 | ov7660_init[i].val); | 1302 | ov7660_init[i].val); |
@@ -1306,6 +1314,8 @@ static void ov7670_init_sensor(struct gspca_dev *gspca_dev) | |||
1306 | int i; | 1314 | int i; |
1307 | struct sd *sd = (struct sd *) gspca_dev; | 1315 | struct sd *sd = (struct sd *) gspca_dev; |
1308 | 1316 | ||
1317 | i2c_w1(gspca_dev, 0x12, 0x80); /* sensor reset */ | ||
1318 | msleep(200); | ||
1309 | for (i = 0; i < ARRAY_SIZE(ov7670_init); i++) { | 1319 | for (i = 0; i < ARRAY_SIZE(ov7670_init); i++) { |
1310 | i2c_w1(gspca_dev, ov7670_init[i].reg, | 1320 | i2c_w1(gspca_dev, ov7670_init[i].reg, |
1311 | ov7670_init[i].val); | 1321 | ov7670_init[i].val); |