Skip to content

Commit

Permalink
[media] gspca - ov519: Fix sensor detection problems
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
moinejf authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 686a948 commit b877a9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/gspca/ov519.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b877a9a

Please sign in to comment.