diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-01-07 03:46:26 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-07 03:46:26 -0500 |
commit | 89dab3573aa1d95fd222ee4551f964bfa4c16823 (patch) | |
tree | e707670d835bdb7c8432c0a6b5cda6dc425a493c | |
parent | d9030f573031244dcffee026cc5e7e2f96f972ce (diff) |
V4L/DVB (6916): ivtv: udelay has to be changed *after* the eeprom was read, not before
The eeprom decides which Hauppauge model it is, so the decision whether to
use an udelay of 5 or 10 needs to be taken after reading the eeprom, not
before.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-i2c.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 6d2dd8764f81..10d6faf8ccda 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -1076,6 +1076,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev, | |||
1076 | ivtv_process_eeprom(itv); | 1076 | ivtv_process_eeprom(itv); |
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | /* The mspx4xx chips need a longer delay for some reason */ | ||
1080 | if (!(itv->hw_flags & IVTV_HW_MSP34XX)) | ||
1081 | itv->i2c_algo.udelay = 5; | ||
1082 | |||
1079 | if (itv->std == 0) { | 1083 | if (itv->std == 0) { |
1080 | itv->std = V4L2_STD_NTSC_M; | 1084 | itv->std = V4L2_STD_NTSC_M; |
1081 | } | 1085 | } |
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 44678fe27a04..36e54f78aa2a 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
@@ -541,7 +541,7 @@ static const struct i2c_algo_bit_data ivtv_i2c_algo_template = { | |||
541 | .setscl = ivtv_setscl_old, | 541 | .setscl = ivtv_setscl_old, |
542 | .getsda = ivtv_getsda_old, | 542 | .getsda = ivtv_getsda_old, |
543 | .getscl = ivtv_getscl_old, | 543 | .getscl = ivtv_getscl_old, |
544 | .udelay = 5, | 544 | .udelay = 10, |
545 | .timeout = 200, | 545 | .timeout = 200, |
546 | }; | 546 | }; |
547 | 547 | ||
@@ -718,9 +718,6 @@ int init_ivtv_i2c(struct ivtv *itv) | |||
718 | sizeof(struct i2c_adapter)); | 718 | sizeof(struct i2c_adapter)); |
719 | memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template, | 719 | memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template, |
720 | sizeof(struct i2c_algo_bit_data)); | 720 | sizeof(struct i2c_algo_bit_data)); |
721 | /* The mspx4xx chips need a longer delay for some reason */ | ||
722 | if (itv->hw_flags & IVTV_HW_MSP34XX) | ||
723 | itv->i2c_algo.udelay = 10; | ||
724 | itv->i2c_algo.data = itv; | 721 | itv->i2c_algo.data = itv; |
725 | itv->i2c_adap.algo_data = &itv->i2c_algo; | 722 | itv->i2c_adap.algo_data = &itv->i2c_algo; |
726 | } | 723 | } |