diff options
author | Antti Palosaari <crope@iki.fi> | 2011-10-09 07:59:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-24 14:55:39 -0500 |
commit | 576b849ea7af9ac05dca3ca92bc62c7528e8f0ef (patch) | |
tree | e21112ac9d817ea2bb4197b0f2d2d736332c83f8 | |
parent | d7d89dc85b9ec0e94f16e811d5f440106e2e77c0 (diff) |
[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>
-rw-r--r-- | drivers/media/common/tuners/mxl5007t.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c index 7eb1bf75cd07..5d02221e99dd 100644 --- a/drivers/media/common/tuners/mxl5007t.c +++ b/drivers/media/common/tuners/mxl5007t.c | |||
@@ -488,9 +488,10 @@ static int mxl5007t_write_regs(struct mxl5007t_state *state, | |||
488 | 488 | ||
489 | static int mxl5007t_read_reg(struct mxl5007t_state *state, u8 reg, u8 *val) | 489 | static int mxl5007t_read_reg(struct mxl5007t_state *state, u8 reg, u8 *val) |
490 | { | 490 | { |
491 | u8 buf[2] = { 0xfb, reg }; | ||
491 | struct i2c_msg msg[] = { | 492 | struct i2c_msg msg[] = { |
492 | { .addr = state->i2c_props.addr, .flags = 0, | 493 | { .addr = state->i2c_props.addr, .flags = 0, |
493 | .buf = ®, .len = 1 }, | 494 | .buf = buf, .len = 2 }, |
494 | { .addr = state->i2c_props.addr, .flags = I2C_M_RD, | 495 | { .addr = state->i2c_props.addr, .flags = I2C_M_RD, |
495 | .buf = val, .len = 1 }, | 496 | .buf = val, .len = 1 }, |
496 | }; | 497 | }; |