Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: ALPS tdmb7 conflict with cx22702



wolfgang@leila.ping.de wrote:

Hi,
IIRC the TDMD7 uses the TDA10046 as a demodulator.

We were talking about the TDMB7.

Wouldn´t it be better to use a proper check for the chip which responds to the I2C access instead of binding a frontend to some specific card?

Not really, since only 0x7f ( = 127) i2c adresses are available and many chips can get configured to several i2c addresses this approach only causes problems. Most current frontend drivers contain only about 20-30% shared code, the remaining are the different setup tables and complicated probing functions for all flavors of possible card/frontend combinations.

All this autoprobing stuff has never been a good idea and was the root of quite a lot error-prone code in the past. I would suggest for all new drivers to make the frontend code a "library" which has nothing to do with the kernel i2c code and neither relies on the dvb_i2c code.

Then the card driver (which is the only instance that knows about the hardware anyway) would call the library function by simply passing it's i2c_xfer function pointer and maybe pointers to the card-specific register initialisation tables. The frontend driver would then only contain the code that can really get shared, all drivers could get as clean and lean as they were once when they worked for a single card only.

what do you think about this approach?

Holger





Home | Main Index | Thread Index