Mailing List archive

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

[linux-dvb] Re: Patch: current I2C transition broke KNC1 type cards



Am Montag, 21. Juni 2004 11:28 schrieb Kenneth Aafløy:
> On Monday 21 June 2004 10:26, Kenneth Aafløy wrote:
> > On Monday 21 June 2004 09:39, Uli Luckas wrote:
> > > Am Montag, 21. Juni 2004 01:08 schrieb Kenneth Aafløy:
> > > > Could not this be better handled by some binary identifyer for each
> > > > cardtype? That is what it becomes after the string parsing at least.
> > >
> > > Well, that would be nice. But as far as I understand the drivers are
> > > using the kernel I2C API where we don't pass any data directly to the
> > > frontend. The frontend is attached by the kernel which passes struct
> > > i2c_adapter. This is why an existing field from i2c_adapter has to be
> > > abused here.
> >
> > Is not this what i2c_adapter->algo_data is for? Stuffing private data in,
> > and as far as I can see it's unused.
>
> Sorry for not waking up before typing, as the saa7146_dev is already
> available in i2c_adapter->dev->driver_data. There is a lot of common data
> in the structures av7110 and budget, below is a suggestion on how we might
> combine these two, and also get rid of the strcmp stuff all in one. I've
> not looked very hard at the ttusb_dec, ttusb, adapter (skystar2.c) structs,
> but I belive that they contain somthing like this in common too.
>
> Kenneth
>
Hi Kenneth,
struct saa7146_extension is filled in and handed over to the saa7146 code via 
saa7146_register_extension at module initialization time though.
At that time we don't know yet, what specific type of card is being detected 
later on.
We could sure update saa7146_extension's details later on, but I wouldn't feel 
verry comfortable with the reduced level of seperation.
After I dived into the code and data structures some more I think we already 
have access to the card type:
((budget *) ((saa7146_dev *) i2c_adapter->data)->ext_priv)->card.type
This requires quite a bunch of data types though that are not known to 
stv0299.c (and should not be).
I agree, that the drivers need general structural improvement. Maybe Ralph 
Metzler's posting points the right way. I don't quite understand how the call 
chain he suggests is set up though. I guess I better read his code first :-)
Anyway, this starts to get a discussion about general improvement of of the 
current driver's I2C structure. My patch was only ment to fix the KNC1 card 
within the framework of the current driver though.
Therefore I'd like to see it commited to CVS. I don't think this would be in 
the way of future improvements but would bring support for KNC1 type of cards 
back to the linux kernel.
With KNC1 support working again we could also fix Cinergy 1200 support and 
thereby offer linux support for the cheapest budget card on the market.

Regards
Uli

-- 
Es würde viel weniger Böses auf Erden geben,
wenn das Böse niemals im Namen des Guten getan werden könnte.
- Marie von Ebner-Eschenbach




Home | Main Index | Thread Index