Skip to content

Commit 576b849

Browse files
palosaariMauro Carvalho Chehab
authored andcommitted
[media] mxl5007t: fix reg read
Register to read should be written to register 0xfb and then perform I2C read to get reg value. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent d7d89dc commit 576b849

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/media/common/tuners/mxl5007t.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,10 @@ static int mxl5007t_write_regs(struct mxl5007t_state *state,
488488

489489
static int mxl5007t_read_reg(struct mxl5007t_state *state, u8 reg, u8 *val)
490490
{
491+
u8 buf[2] = { 0xfb, reg };
491492
struct i2c_msg msg[] = {
492493
{ .addr = state->i2c_props.addr, .flags = 0,
493-
.buf = &reg, .len = 1 },
494+
.buf = buf, .len = 2 },
494495
{ .addr = state->i2c_props.addr, .flags = I2C_M_RD,
495496
.buf = val, .len = 1 },
496497
};

0 commit comments

Comments
 (0)