diff options
author | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-11 02:00:19 -0400 |
---|---|---|
committer | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-11 02:00:19 -0400 |
commit | fe041f64faf5fecd2b6a9edecf7c74bb7cf71c95 (patch) | |
tree | c4f02e247bb32ffab7187997e32b30ccb45883f7 /linux/drivers/media/dvb | |
parent | 442d082f75069d464542421d3e3d6da68c2ddbc4 (diff) | |
download | mediapointer-dvb-s2-fe041f64faf5fecd2b6a9edecf7c74bb7cf71c95.tar.gz mediapointer-dvb-s2-fe041f64faf5fecd2b6a9edecf7c74bb7cf71c95.tar.bz2 |
au8522: fix register read/write high bits
From: Devin Heitmueller <dheitmueller@linuxtv.org>
For the i2c messages to read and write registers, the two high order bits
of the first byte dictates whether it is a read or a write operation.
Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.
Priority: normal
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/frontends/au8522_dig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/frontends/au8522_dig.c b/linux/drivers/media/dvb/frontends/au8522_dig.c index cd8f1ec3e..e63e17827 100644 --- a/linux/drivers/media/dvb/frontends/au8522_dig.c +++ b/linux/drivers/media/dvb/frontends/au8522_dig.c @@ -40,7 +40,7 @@ static int debug; int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) { int ret; - u8 buf [] = { reg >> 8, reg & 0xff, data }; + u8 buf [] = { (reg >> 8) | 0x80, reg & 0xff, data }; struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 3 }; @@ -57,7 +57,7 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) u8 au8522_readreg(struct au8522_state *state, u16 reg) { int ret; - u8 b0 [] = { reg >> 8, reg & 0xff }; + u8 b0 [] = { (reg >> 8) | 0x40, reg & 0xff }; u8 b1 [] = { 0 }; struct i2c_msg msg [] = { |