Skip to content

Commit

Permalink
[media] mxl5007t: fix reg read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Nov 24, 2011
1 parent d7d89dc commit 576b849
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/common/tuners/mxl5007t.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,10 @@ static int mxl5007t_write_regs(struct mxl5007t_state *state,

static int mxl5007t_read_reg(struct mxl5007t_state *state, u8 reg, u8 *val)
{
u8 buf[2] = { 0xfb, reg };
struct i2c_msg msg[] = {
{ .addr = state->i2c_props.addr, .flags = 0,
.buf = &reg, .len = 1 },
.buf = buf, .len = 2 },
{ .addr = state->i2c_props.addr, .flags = I2C_M_RD,
.buf = val, .len = 1 },
};
Expand Down

0 comments on commit 576b849

Please sign in to comment.