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:
 > > On Sun, Jul 18, 2004 at 01:04:02AM +0200, Kenneth Aafløy wrote:
 > > > On Sunday 18 July 2004 00:09, Ralph Metzler wrote:
 > > > > 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.
 > > >
 > > > Hmm, there is no drivers in CVS which has more than one I2C bus, is
 > > > there?
 > 
 > On Sunday 18 July 2004 01:59, Ralph Metzler wrote:
 > > No, but I know of at least one driver/hardware with more than one I2C bus.
 > 
 > 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?

They would all be registered to the same adapter. Otherwise, you would
not need frontend1, frontend2, etc.
They have to belong to the same adapter because such adapters then
have multiple demuxes and each demux can choose separately
which frontend to use as source. 
So, there is no one to one mapping between frontends (or I2C adapters)
and DVB adapters. 
 
 > > 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.

No, absolutely right, that is exactly my point.

The dvb_i2c layer was useful to either directly program I2C hardware
or to put it on top of existing I2C drivers which were in separate
drivers which knew nothing about DVB (like in the bt878 case).
But the whole point of changing to kernel I2C was to get rid of this
extra layer. In the bt878 case this probably is not possible without
changing the bttv driver. Either it has to be changed to be more like
the saa7146, where it only supplies basic functions and the upper
layers (analog TV or DVB) initialize and use only what they need. 
Or one has to build the DVB parts directly into the bttv driver 
like, AFAIK, it is done with the saa7134 and cx88 drivers.

In the meantime it would probably also be enough just not to 
initialize I2C for DVB cards int bttv and export the I2C functions for 
external use?
Or maybe one could even use the kernel I2C layer on top of itself ...


Ralph




Home | Main Index | Thread Index