提交 89dab357 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

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: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 d9030f57
...@@ -1076,6 +1076,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev, ...@@ -1076,6 +1076,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
ivtv_process_eeprom(itv); ivtv_process_eeprom(itv);
} }
/* The mspx4xx chips need a longer delay for some reason */
if (!(itv->hw_flags & IVTV_HW_MSP34XX))
itv->i2c_algo.udelay = 5;
if (itv->std == 0) { if (itv->std == 0) {
itv->std = V4L2_STD_NTSC_M; itv->std = V4L2_STD_NTSC_M;
} }
......
...@@ -541,7 +541,7 @@ static const struct i2c_algo_bit_data ivtv_i2c_algo_template = { ...@@ -541,7 +541,7 @@ static const struct i2c_algo_bit_data ivtv_i2c_algo_template = {
.setscl = ivtv_setscl_old, .setscl = ivtv_setscl_old,
.getsda = ivtv_getsda_old, .getsda = ivtv_getsda_old,
.getscl = ivtv_getscl_old, .getscl = ivtv_getscl_old,
.udelay = 5, .udelay = 10,
.timeout = 200, .timeout = 200,
}; };
...@@ -718,9 +718,6 @@ int init_ivtv_i2c(struct ivtv *itv) ...@@ -718,9 +718,6 @@ int init_ivtv_i2c(struct ivtv *itv)
sizeof(struct i2c_adapter)); sizeof(struct i2c_adapter));
memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template, memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template,
sizeof(struct i2c_algo_bit_data)); sizeof(struct i2c_algo_bit_data));
/* The mspx4xx chips need a longer delay for some reason */
if (itv->hw_flags & IVTV_HW_MSP34XX)
itv->i2c_algo.udelay = 10;
itv->i2c_algo.data = itv; itv->i2c_algo.data = itv;
itv->i2c_adap.algo_data = &itv->i2c_algo; itv->i2c_adap.algo_data = &itv->i2c_algo;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册