summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2011-07-03 08:17:27 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 20:53:38 (GMT)
commitb877a9a7fb00d96bae4ab49c69f1be65b3e87e61 (patch)
tree252fc9272455eccded033d1f63f1d42769b06e66 /drivers
parent686a9488cd23cce1fa8a6cddde0e7668ae2e74b4 (diff)
downloadlinux-b877a9a7fb00d96bae4ab49c69f1be65b3e87e61.tar.xz
[media] gspca - ov519: Fix sensor detection problems
The sensor of some webcams could not be detected due to timing problems in sensor register reading. This patch adds bridge register readings before sensor register reading. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/ov519.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c
index cb42a51..b17c660 100644
--- a/drivers/media/video/gspca/ov519.c
+++ b/drivers/media/video/gspca/ov519.c
@@ -2432,9 +2432,12 @@ static int ov518_i2c_r(struct sd *sd, u8 reg)
/* Initiate 2-byte write cycle */
reg_w(sd, R518_I2C_CTL, 0x03);
+ reg_r8(sd, R518_I2C_CTL);
/* Initiate 2-byte read cycle */
reg_w(sd, R518_I2C_CTL, 0x05);
+ reg_r8(sd, R518_I2C_CTL);
+
value = reg_r(sd, R51x_I2C_DATA);
PDEBUG(D_USBI, "ov518_i2c_r %02x %02x", reg, value);
return value;