Mailing List archive

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

[linux-dvb] Re: [PATCHES] Frontend kernel i2c conversion.



Kenneth Aafløy writes:
 > It was expected, as the bt878 driver has not been updated yet. Anyways, I have 
 > had a look at the bttv driver and there's really no clean way of using the 
 > FE_REGISTER/FE_UNREGISTER i2c client commands. As I see it, ideally the 
 > frontends should not have to know about a dvb_adapter at all. I've attached a 
 > couple of patches for dvb-core, av7110 and stv0299 that implement this 
 > change. Is this an ok method of solving this problem?


No, I also considered this before implementing the FE_(UN)REGISTER
stuff but adapters with more than one I2C bus/frontend will not work like
this. It also makes the frontend driver and dvbdev depend on I2C
driver structs even if you are not using I2C.

You could of course register a list of i2c pointers (or better void *privs)
with the adapter instead of just one. 
Or, to push it back into dvb_frontend, add calls like:
dvb_(un)register_frontend_bus(struct dvb_adapter adapter, void *bus_priv);
where bus_priv of course must not be NULL and can be either 
struct i2c_adapter* or anything else uniquely identifying the frontend
driver.

Hmm, actually, forget about the last paragraph. There are even more
problems, e.g. with the order of module loading, if the dvb_adapter 
is registered after the I2C bus (like with the bt878 cards). And 
don't you also need more module locking because of the missing 
registration callbacks?


Ralph




Home | Main Index | Thread Index