Am Dienstag, den 20.06.2006, 23:39 +0200 schrieb Johannes Stezenbach: > On Tue, Jun 20, 2006, Andrew de Quincey wrote: > > Hi - heres that idea we talked about a week or so back - it makes dvb-pll > > check for an i2c device's presence before going any further. > > > > wdyt? (this isn't a proper committable patch yet BTW; no signed off by etc) > > > diff -r 676364f7622d linux/drivers/media/dvb/frontends/dvb-pll.c > > --- a/linux/drivers/media/dvb/frontends/dvb-pll.c Tue Jun 20 00:30:57 2006 -0300 > > +++ b/linux/drivers/media/dvb/frontends/dvb-pll.c Tue Jun 20 09:28:48 2006 +0100 > > @@ -615,6 +615,20 @@ int dvb_pll_attach(struct dvb_frontend * > > { > > struct dvb_pll_priv *priv = NULL; > > > > + if (fe->ops.i2c_gate_ctrl) > > + fe->ops.i2c_gate_ctrl(fe, 1); > > + if (i2c_smbus_xfer(i2c, pll_addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0) > > + return -1; > > Don't use smbus functions on i2c bus. (And if you do anyway, > use I2C_SMBUS_WRITE/I2C_SMBUS_READ for readability). > > Some i2c controllers (like flexcop) don't support 0 byte messages. > > > + /* prevent 24RF08 corruption */ > > That's what you get for doing random i2c bus writes... > (But I guess no dvb/i2c card has such an EEPROM, AFAIK they are > only used in IBM Thinkpads on the system monitoring smbus.) Johannes, Andrew, now at least I understand a little what was going on during the FE_REFACTORING and dvb-pll once. Thanks, Hermann _______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb