summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-05-07 09:25:28 +0000
committerJohannes Stezenbach <devnull@localhost>2005-05-07 09:25:28 +0000
commit7b434a3aea6c8c44078ebb02c72878fe11f2f27f (patch)
treed0565b028d55f81e6e66cce8ba34eb7bc12b4fff /linux/drivers/media
parente14d905f8cf494ca8c45dba905deda1a8772be4b (diff)
downloadmediapointer-dvb-s2-7b434a3aea6c8c44078ebb02c72878fe11f2f27f.tar.gz
mediapointer-dvb-s2-7b434a3aea6c8c44078ebb02c72878fe11f2f27f.tar.bz2
merge patch by Gerd Knorr from 2.6.12-rc4:
update cx22702 fe driver, add support for using the dvb pll lib, enable cx22702 support in cx88-dvb.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/frontends/cx22702.c15
-rw-r--r--linux/drivers/media/dvb/frontends/cx22702.h3
2 files changed, 17 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx22702.c b/linux/drivers/media/dvb/frontends/cx22702.c
index a83b5ba56..f4aa44136 100644
--- a/linux/drivers/media/dvb/frontends/cx22702.c
+++ b/linux/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 */
diff --git a/linux/drivers/media/dvb/frontends/cx22702.h b/linux/drivers/media/dvb/frontends/cx22702.h
index 6e34f997a..559fdb906 100644
--- a/linux/drivers/media/dvb/frontends/cx22702.h
+++ b/linux/drivers/media/dvb/frontends/cx22702.h
@@ -36,6 +36,9 @@ struct cx22702_config
u8 demod_address;
/* PLL maintenance */
+ u8 pll_address;
+ struct dvb_pll_desc *pll_desc;
+
int (*pll_init)(struct dvb_frontend* fe);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};