Mailing List archive

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

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



On Mon, Jul 19, 2004 at 02:55:39PM +0200, Kenneth Aafløy wrote:
> On Monday 19 July 2004 00:15, Johannes Stezenbach wrote:
> > It is very common for STB chips to have more than one I2C controller --
> > which doesn't mean that all I2C buses are used to connect DVB frontends,
> > but it is not unexpected for a dual-FE box to have each FE on its own I2C
> > bus.
> 
> Ok, so there is hardware with both multiple I2C buses and frontends, nice to 
> know. What I wonder about now, is how are these implemented multiple frontend 
> drivers implemented? Would this x extra frontend be registered together with 
> the same adapter or will there be multiple adapters, each attached to their 
> frontend?

One adapter, with multiple frontends and demuxes (one device for each
simultaneously usable channel, e.g. 2+1 for the frontends and playback).


> On Sunday 18 July 2004 01:59, Ralph Metzler wrote:
> > Sorry, but to get all this done properly in the way you want to do it
> > (i.e. without the kernel i2c registration callback) you will basically
> > have to reimplement the whole dvb_i2c layer again ...
> 
> And that is unacceptable, is it not? Because the goal here is to remove that 
> layer completly, or have I missed something.

For the V4 API I'm just working on a platform where the I2C drivers
have been implemented seperately from DVB, i.e. I can't use the
client_register() callback. I tried to solve this by adding a

extern int dvb_register_i2c_adapter(struct i2c_adapter *i2c_adapter,
                                    struct dvb_adapter *dvb_adapter);

(I still have to get hold of the i2c_adapter pointer, but that's
managable).

Frontends would then call
extern int dvb_register_frontend(struct i2c_client *client, struct dvb_frontend *fe_data);

from their attach_adapter() function. However, if the frontend driver
is loaded after the i2c adapter driver, but before the DVB driver,
registration would fail. To solve this I would need a second list
to keep track of known-but-not-yet-registered frontends. Not difficult
to do, but awful.

Maybe that's what Ralph means when he says "reimplement the whole dvb_i2c layer"?

I'm still looking for a better solution, but i fear there will be none.


Johannes




Home | Main Index | Thread Index