Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: [rfc/patch] pll handling and cx22702 update
Gerd Knorr wrote:
> Here is one more attempt to move to a more sane pll handling. The
> intention is to move pll mostly out of the dvb adapter drivers, allow
> sharing it and kill code duplication. It also moves away from many
> little functions which all do basically the same and uses a generic,
> configurable function instead.
>
> I use a data structure (struct dvb_pll_desc) which describes how the pll
> must be programmed, i.e. which frequency ranges need which config bytes
> and so on. I think that should catch all those common pll's which are
> programmed with a 4-byte i2c write sequence, two bytes divisor and two
> config bytes.
>
> There is a function which will take such a description + frequency and
> calculates the command sequence resulting from that. Actually sending
> that command sequence to the pll remains the job of the frontend and/or
> adapter driver, that is too hardware specific to be factored out into
> common code.
>
> The patch also contains my latest cx22702 code which actually uses the
> new pll handling. More sample code can be found in the current
> video4linux cvs, in cx88-dvb.c (look there to see how this can be used
> with a mt352 frontend).
>
> Don't be scared because of yet another redesign, the old and new stuff
> can live in parallel, so can have a more smooth switchover than with
> the frontend refactoring ;)
Basically I like your approach, but your patch gets a ton of rejects
in cx22702.c against dvb-kernel CVS :-(
The improvements in code readablity are also not easy to see from your
patch since it mixes the PLL cleanup with a lot of other changes.
Johannes
Home |
Main Index |
Thread Index