summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorOliver Endriss <devnull@localhost>2003-11-25 19:13:22 +0000
committerOliver Endriss <devnull@localhost>2003-11-25 19:13:22 +0000
commit03a665292520b7d6e6373abb7166d8e9f80b960f (patch)
treebb4a0b018733a05083cd695e076d54105400c642 /linux
parentea594f01cb39d739763ccc2f386f9831323ec116 (diff)
downloadmediapointer-dvb-s2-03a665292520b7d6e6373abb7166d8e9f80b960f.tar.gz
mediapointer-dvb-s2-03a665292520b7d6e6373abb7166d8e9f80b960f.tar.bz2
introduced flag SAA7146_I2C_SHORT_DELAY to speed up I2C access
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c5
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c1
-rw-r--r--linux/include/media/saa7146.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 06f56531a..5db9ef621 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -301,8 +301,9 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], i
goto out;
}
- if (count > 3) short_delay = 1;
-
+ if ( count > 3 || 0 != (SAA7146_I2C_SHORT_DELAY & dev->ext->flags) )
+ short_delay = 1;
+
do {
/* reset the i2c-device if necessary */
err = saa7146_i2c_reset(dev);
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 577e79c55..6f2ecb376 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -4974,6 +4974,7 @@ static struct saa7146_ext_vv av7110_vv_data_c = {
static struct saa7146_extension av7110_extension = {
.name = "dvb\0",
+ .flags = SAA7146_I2C_SHORT_DELAY,
.module = THIS_MODULE,
.pci_tbl = &pci_tbl[0],
diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h
index f06db5313..034280d24 100644
--- a/linux/include/media/saa7146.h
+++ b/linux/include/media/saa7146.h
@@ -87,6 +87,7 @@ struct saa7146_extension
{
char name[32]; /* name of the device */
#define SAA7146_USE_I2C_IRQ 0x1
+#define SAA7146_I2C_SHORT_DELAY 0x2
int flags;
/* pairs of subvendor and subdevice ids for