diff options
author | Gerd Knorr <kraxel@bytesex.org> | 2005-05-01 11:59:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:59:20 -0400 |
commit | 9990d744bea7d28e83c420e2c9d524c7a8a2d136 (patch) | |
tree | 386a5540b41bf212a7b1fc5485292dc8de03bcf1 /drivers | |
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')
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.c | 15 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.h | 3 | ||||
-rw-r--r-- | drivers/media/video/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 2 |
4 files changed, 19 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index 1930b513eefa..011860ce36cc 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include "dvb_frontend.h" | 34 | #include "dvb_frontend.h" |
35 | #include "dvb-pll.h" | ||
35 | #include "cx22702.h" | 36 | #include "cx22702.h" |
36 | 37 | ||
37 | 38 | ||
@@ -203,7 +204,19 @@ static int cx22702_set_tps (struct dvb_frontend* fe, struct dvb_frontend_paramet | |||
203 | 204 | ||
204 | /* set PLL */ | 205 | /* set PLL */ |
205 | cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) &0xfe); | 206 | cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) &0xfe); |
206 | state->config->pll_set(fe, p); | 207 | if (state->config->pll_set) { |
208 | state->config->pll_set(fe, p); | ||
209 | } else if (state->config->pll_desc) { | ||
210 | u8 pllbuf[4]; | ||
211 | struct i2c_msg msg = { .addr = state->config->pll_address, | ||
212 | .buf = pllbuf, .len = 4 }; | ||
213 | dvb_pll_configure(state->config->pll_desc, pllbuf, | ||
214 | p->frequency, | ||
215 | p->u.ofdm.bandwidth); | ||
216 | i2c_transfer(state->i2c, &msg, 1); | ||
217 | } else { | ||
218 | BUG(); | ||
219 | } | ||
207 | cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) | 1); | 220 | cx22702_writereg (state, 0x0D, cx22702_readreg(state,0x0D) | 1); |
208 | 221 | ||
209 | /* set inversion */ | 222 | /* set inversion */ |
diff --git a/drivers/media/dvb/frontends/cx22702.h b/drivers/media/dvb/frontends/cx22702.h index 6e34f997aba2..559fdb906669 100644 --- a/drivers/media/dvb/frontends/cx22702.h +++ b/drivers/media/dvb/frontends/cx22702.h | |||
@@ -36,6 +36,9 @@ struct cx22702_config | |||
36 | u8 demod_address; | 36 | u8 demod_address; |
37 | 37 | ||
38 | /* PLL maintenance */ | 38 | /* PLL maintenance */ |
39 | u8 pll_address; | ||
40 | struct dvb_pll_desc *pll_desc; | ||
41 | |||
39 | int (*pll_init)(struct dvb_frontend* fe); | 42 | int (*pll_init)(struct dvb_frontend* fe); |
40 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); | 43 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); |
41 | }; | 44 | }; |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index c1b3542dad88..d3dd4228b72d 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -252,6 +252,7 @@ config VIDEO_SAA7134_DVB | |||
252 | depends on VIDEO_SAA7134 && DVB_CORE | 252 | depends on VIDEO_SAA7134 && DVB_CORE |
253 | select VIDEO_BUF_DVB | 253 | select VIDEO_BUF_DVB |
254 | select DVB_MT352 | 254 | select DVB_MT352 |
255 | select DVB_CX22702 | ||
255 | ---help--- | 256 | ---help--- |
256 | This adds support for DVB cards based on the | 257 | This adds support for DVB cards based on the |
257 | Philips saa7134 chip. | 258 | Philips saa7134 chip. |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 84d17435f503..1ca37315066e 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/suspend.h> | 31 | #include <linux/suspend.h> |
32 | 32 | ||
33 | /* those two frontends need merging via linuxtv cvs ... */ | 33 | /* those two frontends need merging via linuxtv cvs ... */ |
34 | #define HAVE_CX22702 0 | 34 | #define HAVE_CX22702 1 |
35 | #define HAVE_OR51132 1 | 35 | #define HAVE_OR51132 1 |
36 | 36 | ||
37 | #include "cx88.h" | 37 | #include "cx88.h" |