Mailing List archive

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

[linux-dvb] Re: refactoring



> > > I have left it using the kernel i2c_adapter stuff, and i2c_transfer()
> > > functions as before.
> >
> > Which is a bad idea.  Have you actually looked at my cx22702 version?
> > There is much generic, reusable code in there.  And it is generic
> > *because* it makes heavy use of the kernl i2c infrastructure.  It
> > creates and registeres i2c_client structs for both demod + pll and then
> > passes around just a i2c_client ptr (instead of a fe-specific struct) to
> > many functions, like this one here:
> >
> >    static int pll_dtt759x_set_tv_freq(struct i2c_client *c, u32 freq,
> >                  int bandwidth);
> >
> > It's absolutely no problem to move that to some other -- say -- pll-lib
> > module and then have other frontend driver reuse it.
>
> We decided that that was not worth it. So I did not bother to implement
> support for it.

Also, this is still possible with the current architecture - you'd just pass 
state->i2c instead of the client structure.

However, as it turns out, this is not useful. Several of the PLL 
implementations need access to the state structure itself in order to write 
extra bits on the demod. These values are hardware specific - so they don't 
belong in the general purpose demod driver. Which PLLs need it depends on the 
exact hardware setup the manufacturer has used.

The current system is as flexible as possible, specifically because we need it 
to be - DVB frontends are just generally horrible.




Home | Main Index | Thread Index