diff options
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-i2c.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-i2c.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index 78c07db8a..8979b0a32 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-i2c.c,v 1.8 2004/12/09 12:51:35 kraxel Exp $ + * $Id: saa7134-i2c.c,v 1.9 2004/12/10 12:33:39 kraxel Exp $ * * device driver for philips saa7134 based TV cards * i2c interface support @@ -24,6 +24,7 @@ #include <linux/init.h> #include <linux/list.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/kernel.h> #include <linux/slab.h> #include <linux/delay.h> @@ -214,13 +215,6 @@ static inline int i2c_send_byte(struct saa7134_dev *dev, if (!i2c_is_busy_wait(dev)) return -EIO; status = i2c_get_status(dev); -#if 1 /* debug */ - if (DONE_READ == status) { - unsigned char data = saa_readb(SAA7134_I2C_DATA); - d2printk(KERN_DEBUG "%s: i2c data <= 0x%x\n",dev->name,data); - d1printk(" [%02x]",data); - } -#endif if (i2c_is_error(status)) return -EIO; return 0; @@ -264,6 +258,15 @@ 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) { + /* workaround for a saa7134 i2c bug + * needed to talk to the mt352 demux + * thanks to pinnacle for the hint */ + int quirk = 0xfd; + d1printk(" [%02x quirk]",quirk); + i2c_send_byte(dev,START,quirk); + i2c_recv_byte(dev); + } d1printk(" < %02x", addr); rc = i2c_send_byte(dev,START,addr); if (rc < 0) |