summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-i2c.c
diff options
context:
space:
mode:
authorKyle Strickland <kyle@kyle.strickland.name>2012-02-18 02:24:53 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-08 11:01:25 -0300
commit25fa207157102162b1a6abba339dc5fe03f6adc5 (patch)
treed5475f94bd89842c1cb2411c3351de163038fe94 /drivers/media/video/saa7134/saa7134-i2c.c
parent8d834b526a301d2d10db25835d195edf1141f1a0 (diff)
downloadop-kernel-dev-25fa207157102162b1a6abba339dc5fe03f6adc5.zip
op-kernel-dev-25fa207157102162b1a6abba339dc5fe03f6adc5.tar.gz
[media] Add support for KWorld PC150-U ATSC hybrid tuner card
[mchehab@redhat.com: CodingStyle fixes] Signed-off-by: Kyle Strickland <kyle@kyle.strickland.name> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-i2c.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-i2c.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c
index 2d3f6d2..a176ec3 100644
--- a/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/drivers/media/video/saa7134/saa7134-i2c.c
@@ -254,7 +254,9 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
addr = msgs[i].addr << 1;
if (msgs[i].flags & I2C_M_RD)
addr |= 1;
- if (i > 0 && msgs[i].flags & I2C_M_RD && msgs[i].addr != 0x40) {
+ if (i > 0 && msgs[i].flags &
+ I2C_M_RD && msgs[i].addr != 0x40 &&
+ msgs[i].addr != 0x19) {
/* workaround for a saa7134 i2c bug
* needed to talk to the mt352 demux
* thanks to pinnacle for the hint */
@@ -279,6 +281,16 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
d1printk("%02x", rc);
msgs[i].buf[byte] = rc;
}
+ /* discard mysterious extra byte when reading
+ from Samsung S5H1411. i2c bus gets error
+ if we do not. */
+ if (0x19 == msgs[i].addr) {
+ d1printk(" ?");
+ rc = i2c_recv_byte(dev);
+ if (rc < 0)
+ goto err;
+ d1printk("%02x", rc);
+ }
} else {
/* write bytes */
d2printk("write bytes\n");
OpenPOWER on IntegriCloud