Commit b877a9a7 authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab

[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: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 686a9488
...@@ -2432,9 +2432,12 @@ static int ov518_i2c_r(struct sd *sd, u8 reg) ...@@ -2432,9 +2432,12 @@ static int ov518_i2c_r(struct sd *sd, u8 reg)
/* Initiate 2-byte write cycle */ /* Initiate 2-byte write cycle */
reg_w(sd, R518_I2C_CTL, 0x03); reg_w(sd, R518_I2C_CTL, 0x03);
reg_r8(sd, R518_I2C_CTL);
/* Initiate 2-byte read cycle */ /* Initiate 2-byte read cycle */
reg_w(sd, R518_I2C_CTL, 0x05); reg_w(sd, R518_I2C_CTL, 0x05);
reg_r8(sd, R518_I2C_CTL);
value = reg_r(sd, R51x_I2C_DATA); value = reg_r(sd, R51x_I2C_DATA);
PDEBUG(D_USBI, "ov518_i2c_r %02x %02x", reg, value); PDEBUG(D_USBI, "ov518_i2c_r %02x %02x", reg, value);
return value; return value;
......
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