Commit ac51295c authored by Erik Andrén's avatar Erik Andrén Committed by Mauro Carvalho Chehab

V4L/DVB (12222): gspca - stv06xx-hdcs: Fix sensor sequence bug

All hdcs registers use bit 0 as a read/write flag and needs to be shifted one bit to the left. This wasn't accounted for when doing a sequence of writes.
Signed-off-by: default avatarErik Andrén <erik.andren@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 36a516d9
...@@ -131,9 +131,11 @@ static int hdcs_reg_write_seq(struct sd *sd, u8 reg, u8 *vals, u8 len) ...@@ -131,9 +131,11 @@ static int hdcs_reg_write_seq(struct sd *sd, u8 reg, u8 *vals, u8 len)
(reg + len > 0xff))) (reg + len > 0xff)))
return -EINVAL; return -EINVAL;
for (i = 0; i < len; i++, reg++) { for (i = 0; i < len; i++) {
regs[2*i] = reg; regs[2 * i] = reg;
regs[2*i+1] = vals[i]; regs[2 * i + 1] = vals[i];
/* All addresses are shifted left one bit as bit 0 toggles r/w */
reg += 2;
} }
return stv06xx_write_sensor_bytes(sd, regs, len); return stv06xx_write_sensor_bytes(sd, regs, len);
......
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