diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-11-21 10:35:10 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-11-21 10:35:10 +0200 |
commit | 7e385b9df5fa0f2d85b30da7e758739a06563650 (patch) | |
tree | 4d34d642ed65646abcb55e263958936d577518ba /linux/drivers/media | |
parent | 1d3442aedeb650d29782a45b25920036c95e29a8 (diff) | |
download | mediapointer-dvb-s2-7e385b9df5fa0f2d85b30da7e758739a06563650.tar.gz mediapointer-dvb-s2-7e385b9df5fa0f2d85b30da7e758739a06563650.tar.bz2 |
TDA826x I2C read with 2 messages
From: Patrick Boettcher <pb@linuxtv.org>
Added a dump I2C message to the TDA826x-driver to fix I2C read for
identification with ttusb2-driver.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda826x.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda826x.c b/linux/drivers/media/dvb/frontends/tda826x.c index 4f01d7b47..79f971dc5 100644 --- a/linux/drivers/media/dvb/frontends/tda826x.c +++ b/linux/drivers/media/dvb/frontends/tda826x.c @@ -132,18 +132,21 @@ struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2 { struct tda826x_priv *priv = NULL; u8 b1 [] = { 0, 0 }; - struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 }; + struct i2c_msg msg[2] = { + { .addr = addr, .flags = 0, .buf = NULL, .len = 0 }, + { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 } + }; int ret; dprintk("%s:\n", __FUNCTION__); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - ret = i2c_transfer (i2c, &msg, 1); + ret = i2c_transfer (i2c, msg, 2); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - if (ret != 1) + if (ret != 2) return NULL; if (!(b1[1] & 0x80)) return NULL; |