diff options
author | Gerd Knorr <kraxel@bytesex.org> | 2005-05-01 08:59:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 08:59:20 -0700 |
commit | 9990d744bea7d28e83c420e2c9d524c7a8a2d136 (patch) | |
tree | 386a5540b41bf212a7b1fc5485292dc8de03bcf1 /drivers/media/dvb/frontends/cx22702.c | |
parent | 1622c3fcf4c1c6c8267938f366ecd2a348d67d93 (diff) |
[PATCH] dvb: cx22702 frontend driver update
update cx22702 fe driver, add support for using the dvb pll lib, enable
cx22702 support in cx88-dvb.
Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/cx22702.c')
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index 1930b513eef..011860ce36c 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c @@ -32,6 +32,7 @@ #include <linux/slab.h> #include <linux/delay.h> #include "dvb_frontend.h" +#include "dvb-pll.h" #include "cx22702.h" @@ -203,7 +204,19 @@ static int cx22702_set_tps (struct dvb_frontend* fe, struct dvb_frontend_paramet /* set PLL */ cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) &0xfe); - state->config->pll_set(fe, p); + if (state->config->pll_set) { + state->config->pll_set(fe, p); + } else if (state->config->pll_desc) { + u8 pllbuf[4]; + struct i2c_msg msg = { .addr = state->config->pll_address, + .buf = pllbuf, .len = 4 }; + dvb_pll_configure(state->config->pll_desc, pllbuf, + p->frequency, + p->u.ofdm.bandwidth); + i2c_transfer(state->i2c, &msg, 1); + } else { + BUG(); + } cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) | 1); /* set inversion */ |