aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/b2c2/Kconfig2
-rw-r--r--drivers/media/dvb/b2c2/flexcop-fe-tuner.c4
-rw-r--r--drivers/media/dvb/bt8xx/Kconfig2
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c2
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig12
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c10
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mb.c4
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c2
-rw-r--r--drivers/media/dvb/dvb-usb/opera1.c2
-rw-r--r--drivers/media/dvb/dvb-usb/umt-010.c2
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c117
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.h69
-rw-r--r--drivers/media/dvb/ttpci/Kconfig2
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c2
-rw-r--r--drivers/media/video/cx88/Kconfig2
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c34
-rw-r--r--drivers/media/video/saa7134/Kconfig2
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c10
19 files changed, 148 insertions, 134 deletions
diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig
index a0dcd59da76e..3197aeb61d1f 100644
--- a/drivers/media/dvb/b2c2/Kconfig
+++ b/drivers/media/dvb/b2c2/Kconfig
@@ -1,7 +1,7 @@
1config DVB_B2C2_FLEXCOP 1config DVB_B2C2_FLEXCOP
2 tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" 2 tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters"
3 depends on DVB_CORE && I2C 3 depends on DVB_CORE && I2C
4 select DVB_PLL 4 select DVB_PLL if !DVB_FE_CUSTOMISE
5 select DVB_STV0299 if !DVB_FE_CUSTOMISE 5 select DVB_STV0299 if !DVB_FE_CUSTOMISE
6 select DVB_MT352 if !DVB_FE_CUSTOMISE 6 select DVB_MT352 if !DVB_FE_CUSTOMISE
7 select DVB_MT312 if !DVB_FE_CUSTOMISE 7 select DVB_MT312 if !DVB_FE_CUSTOMISE
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index b02c2fd65baa..0378fd646591 100644
--- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -500,13 +500,13 @@ int flexcop_frontend_init(struct flexcop_device *fc)
500 /* try the air atsc 2nd generation (nxt2002) */ 500 /* try the air atsc 2nd generation (nxt2002) */
501 if ((fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, &fc->i2c_adap)) != NULL) { 501 if ((fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config, &fc->i2c_adap)) != NULL) {
502 fc->dev_type = FC_AIR_ATSC2; 502 fc->dev_type = FC_AIR_ATSC2;
503 dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, &dvb_pll_samsung_tbmv); 503 dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL, DVB_PLL_SAMSUNG_TBMV);
504 info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); 504 info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address);
505 } else 505 } else
506 /* try the air atsc 3nd generation (lgdt3303) */ 506 /* try the air atsc 3nd generation (lgdt3303) */
507 if ((fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) { 507 if ((fc->fe = dvb_attach(lgdt330x_attach, &air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
508 fc->dev_type = FC_AIR_ATSC3; 508 fc->dev_type = FC_AIR_ATSC3;
509 dvb_attach(dvb_pll_attach, fc->fe, 0x61, &fc->i2c_adap, &dvb_pll_lg_tdvs_h06xf); 509 dvb_attach(dvb_pll_attach, fc->fe, 0x61, &fc->i2c_adap, DVB_PLL_LG_TDVS_H06XF);
510 info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address); 510 info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address);
511 } else 511 } else
512 /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */ 512 /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig
index cfd6fb729a61..ea666174e988 100644
--- a/drivers/media/dvb/bt8xx/Kconfig
+++ b/drivers/media/dvb/bt8xx/Kconfig
@@ -7,7 +7,7 @@ config DVB_BT8XX
7 select DVB_CX24110 if !DVB_FE_CUSTOMISE 7 select DVB_CX24110 if !DVB_FE_CUSTOMISE
8 select DVB_OR51211 if !DVB_FE_CUSTOMISE 8 select DVB_OR51211 if !DVB_FE_CUSTOMISE
9 select DVB_LGDT330X if !DVB_FE_CUSTOMISE 9 select DVB_LGDT330X if !DVB_FE_CUSTOMISE
10 select DVB_PLL 10 select DVB_PLL if !DVB_FE_CUSTOMISE
11 select DVB_ZL10353 if !DVB_FE_CUSTOMISE 11 select DVB_ZL10353 if !DVB_FE_CUSTOMISE
12 select FW_LOADER 12 select FW_LOADER
13 help 13 help
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 4f1c09bee538..5120af41a818 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -611,7 +611,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
611 card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config, card->i2c_adapter); 611 card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config, card->i2c_adapter);
612 if (card->fe != NULL) { 612 if (card->fe != NULL) {
613 dvb_attach(dvb_pll_attach, card->fe, 0x61, 613 dvb_attach(dvb_pll_attach, card->fe, 0x61,
614 card->i2c_adapter, &dvb_pll_lg_tdvs_h06xf); 614 card->i2c_adapter, DVB_PLL_LG_TDVS_H06XF);
615 dprintk ("dvb_bt8xx: lgdt330x detected\n"); 615 dprintk ("dvb_bt8xx: lgdt330x detected\n");
616 } 616 }
617 break; 617 break;
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index f5e496d65224..40e41f2f5afe 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -2,7 +2,6 @@ config DVB_USB
2 tristate "Support for various USB DVB devices" 2 tristate "Support for various USB DVB devices"
3 depends on DVB_CORE && USB && I2C 3 depends on DVB_CORE && USB && I2C
4 select FW_LOADER 4 select FW_LOADER
5 select DVB_PLL
6 help 5 help
7 By enabling this you will be able to choose the various supported 6 By enabling this you will be able to choose the various supported
8 USB1.1 and USB2.0 DVB devices. 7 USB1.1 and USB2.0 DVB devices.
@@ -27,13 +26,14 @@ config DVB_USB_A800
27 depends on DVB_USB 26 depends on DVB_USB
28 select DVB_DIB3000MC 27 select DVB_DIB3000MC
29 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE 28 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE
29 select DVB_PLL if !DVB_FE_CUSTOMISE
30 help 30 help
31 Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver. 31 Say Y here to support the AVerMedia AverTV DVB-T USB 2.0 (A800) receiver.
32 32
33config DVB_USB_DIBUSB_MB 33config DVB_USB_DIBUSB_MB
34 tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)" 34 tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)"
35 depends on DVB_USB 35 depends on DVB_USB
36 select DVB_PLL 36 select DVB_PLL if !DVB_FE_CUSTOMISE
37 select DVB_DIB3000MB 37 select DVB_DIB3000MB
38 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE 38 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE
39 help 39 help
@@ -89,7 +89,7 @@ config DVB_USB_DIB0700
89config DVB_USB_UMT_010 89config DVB_USB_UMT_010
90 tristate "HanfTek UMT-010 DVB-T USB2.0 support" 90 tristate "HanfTek UMT-010 DVB-T USB2.0 support"
91 depends on DVB_USB 91 depends on DVB_USB
92 select DVB_PLL 92 select DVB_PLL if !DVB_FE_CUSTOMISE
93 select DVB_DIB3000MC 93 select DVB_DIB3000MC
94 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE 94 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE
95 help 95 help
@@ -98,7 +98,7 @@ config DVB_USB_UMT_010
98config DVB_USB_CXUSB 98config DVB_USB_CXUSB
99 tristate "Conexant USB2.0 hybrid reference design support" 99 tristate "Conexant USB2.0 hybrid reference design support"
100 depends on DVB_USB 100 depends on DVB_USB
101 select DVB_PLL 101 select DVB_PLL if !DVB_FE_CUSTOMISE
102 select DVB_CX22702 if !DVB_FE_CUSTOMISE 102 select DVB_CX22702 if !DVB_FE_CUSTOMISE
103 select DVB_LGDT330X if !DVB_FE_CUSTOMISE 103 select DVB_LGDT330X if !DVB_FE_CUSTOMISE
104 select DVB_MT352 if !DVB_FE_CUSTOMISE 104 select DVB_MT352 if !DVB_FE_CUSTOMISE
@@ -142,7 +142,7 @@ config DVB_USB_AU6610
142config DVB_USB_DIGITV 142config DVB_USB_DIGITV
143 tristate "Nebula Electronics uDigiTV DVB-T USB2.0 support" 143 tristate "Nebula Electronics uDigiTV DVB-T USB2.0 support"
144 depends on DVB_USB 144 depends on DVB_USB
145 select DVB_PLL 145 select DVB_PLL if !DVB_FE_CUSTOMISE
146 select DVB_NXT6000 if !DVB_FE_CUSTOMISE 146 select DVB_NXT6000 if !DVB_FE_CUSTOMISE
147 select DVB_MT352 if !DVB_FE_CUSTOMISE 147 select DVB_MT352 if !DVB_FE_CUSTOMISE
148 help 148 help
@@ -188,6 +188,7 @@ config DVB_USB_NOVA_T_USB2
188 depends on DVB_USB 188 depends on DVB_USB
189 select DVB_DIB3000MC 189 select DVB_DIB3000MC
190 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE 190 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE
191 select DVB_PLL if !DVB_FE_CUSTOMISE
191 help 192 help
192 Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver. 193 Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver.
193 194
@@ -216,6 +217,7 @@ config DVB_USB_OPERA1
216 tristate "Opera1 DVB-S USB2.0 receiver" 217 tristate "Opera1 DVB-S USB2.0 receiver"
217 depends on DVB_USB 218 depends on DVB_USB
218 select DVB_STV0299 if !DVB_FE_CUSTOMISE 219 select DVB_STV0299 if !DVB_FE_CUSTOMISE
220 select DVB_PLL if !DVB_FE_CUSTOMISE
219 help 221 help
220 Say Y here to support the Opera DVB-S USB2.0 receiver. 222 Say Y here to support the Opera DVB-S USB2.0 receiver.
221 223
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 88aeb2512212..04e31cf7d530 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -355,34 +355,34 @@ static struct mt352_config cxusb_mt352_config = {
355static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) 355static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap)
356{ 356{
357 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap, 357 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
358 &dvb_pll_fmd1216me); 358 DVB_PLL_FMD1216ME);
359 return 0; 359 return 0;
360} 360}
361 361
362static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap) 362static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap)
363{ 363{
364 dvb_attach(dvb_pll_attach, adap->fe, 0x61, 364 dvb_attach(dvb_pll_attach, adap->fe, 0x61,
365 NULL, &dvb_pll_thomson_dtt7579); 365 NULL, DVB_PLL_THOMSON_DTT7579);
366 return 0; 366 return 0;
367} 367}
368 368
369static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap) 369static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap)
370{ 370{
371 dvb_attach(dvb_pll_attach, adap->fe, 0x61, NULL, &dvb_pll_lg_z201); 371 dvb_attach(dvb_pll_attach, adap->fe, 0x61, NULL, DVB_PLL_LG_Z201);
372 return 0; 372 return 0;
373} 373}
374 374
375static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap) 375static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap)
376{ 376{
377 dvb_attach(dvb_pll_attach, adap->fe, 0x60, 377 dvb_attach(dvb_pll_attach, adap->fe, 0x60,
378 NULL, &dvb_pll_thomson_dtt7579); 378 NULL, DVB_PLL_THOMSON_DTT7579);
379 return 0; 379 return 0;
380} 380}
381 381
382static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap) 382static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap)
383{ 383{
384 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap, 384 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
385 &dvb_pll_lg_tdvs_h06xf); 385 DVB_PLL_LG_TDVS_H06XF);
386 return 0; 386 return 0;
387} 387}
388 388
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index 5143e426d283..9a184da01c47 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -295,7 +295,7 @@ int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
295 tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); 295 tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1);
296 if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) == NULL) { 296 if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) == NULL) {
297 /* not found - use panasonic pll parameters */ 297 /* not found - use panasonic pll parameters */
298 if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL) 298 if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, DVB_PLL_ENV57H1XD5) == NULL)
299 return -ENOMEM; 299 return -ENOMEM;
300 } else { 300 } else {
301 st->mt2060_present = 1; 301 st->mt2060_present = 1;
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index 67cd48425d46..4cf7bbc7f6a4 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -45,7 +45,7 @@ static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap)
45 st->tuner_addr = 0x61; 45 st->tuner_addr = 0x61;
46 46
47 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap, 47 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
48 &dvb_pll_tua6010xs); 48 DVB_PLL_TUA6010XS);
49 return 0; 49 return 0;
50} 50}
51 51
@@ -56,7 +56,7 @@ static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap)
56 st->tuner_addr = 0x60; 56 st->tuner_addr = 0x60;
57 57
58 dvb_attach(dvb_pll_attach, adap->fe, 0x60, &adap->dev->i2c_adap, 58 dvb_attach(dvb_pll_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
59 &dvb_pll_tda665x); 59 DVB_PLL_TDA665X);
60 return 0; 60 return 0;
61} 61}
62 62
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index 36e0f8fee37a..bca1e0905739 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -148,7 +148,7 @@ static int digitv_tuner_attach(struct dvb_usb_adapter *adap)
148{ 148{
149 struct digitv_state *st = adap->dev->priv; 149 struct digitv_state *st = adap->dev->priv;
150 150
151 if (!dvb_attach(dvb_pll_attach, adap->fe, 0x60, NULL, &dvb_pll_tded4)) 151 if (!dvb_attach(dvb_pll_attach, adap->fe, 0x60, NULL, DVB_PLL_TDED4))
152 return -ENODEV; 152 return -ENODEV;
153 153
154 if (st->is_nxt6000) 154 if (st->is_nxt6000)
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c
index 518d7ad217df..ee6bf29223ff 100644
--- a/drivers/media/dvb/dvb-usb/opera1.c
+++ b/drivers/media/dvb/dvb-usb/opera1.c
@@ -263,7 +263,7 @@ static int opera1_tuner_attach(struct dvb_usb_adapter *adap)
263{ 263{
264 dvb_attach( 264 dvb_attach(
265 dvb_pll_attach, adap->fe, 0xc0>>1, 265 dvb_pll_attach, adap->fe, 0xc0>>1,
266 &adap->dev->i2c_adap, &dvb_pll_opera1 266 &adap->dev->i2c_adap, DVB_PLL_OPERA1
267 ); 267 );
268 return 0; 268 return 0;
269} 269}
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c
index 9705e9c64f81..0dcab3d4e236 100644
--- a/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/drivers/media/dvb/dvb-usb/umt-010.c
@@ -65,7 +65,7 @@ static int umt_mt352_frontend_attach(struct dvb_usb_adapter *adap)
65 65
66static int umt_tuner_attach (struct dvb_usb_adapter *adap) 66static int umt_tuner_attach (struct dvb_usb_adapter *adap)
67{ 67{
68 dvb_attach(dvb_pll_attach, adap->fe, 0x61, NULL, &dvb_pll_tua6034); 68 dvb_attach(dvb_pll_attach, adap->fe, 0x61, NULL, DVB_PLL_TUA6034);
69 return 0; 69 return 0;
70} 70}
71 71
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index 5c26fa112983..01a11262c8db 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -24,6 +24,23 @@
24 24
25#include "dvb-pll.h" 25#include "dvb-pll.h"
26 26
27struct dvb_pll_desc {
28 char *name;
29 u32 min;
30 u32 max;
31 u32 iffreq;
32 void (*set)(u8 *buf, const struct dvb_frontend_parameters *params);
33 u8 *initdata;
34 u8 *sleepdata;
35 int count;
36 struct {
37 u32 limit;
38 u32 stepsize;
39 u8 config;
40 u8 cb;
41 } entries[12];
42};
43
27/* ----------------------------------------------------------- */ 44/* ----------------------------------------------------------- */
28/* descriptions */ 45/* descriptions */
29 46
@@ -44,7 +61,7 @@ static u8 tua603x_agc103[] = { 2, 0x80|0x40|0x18|0x06|0x01, 0x00|0x50 };
44 0x20 = AGC Take over point = 112 dBuV */ 61 0x20 = AGC Take over point = 112 dBuV */
45static u8 tua603x_agc112[] = { 2, 0x80|0x40|0x18|0x04|0x01, 0x80|0x20 }; 62static u8 tua603x_agc112[] = { 2, 0x80|0x40|0x18|0x04|0x01, 0x80|0x20 };
46 63
47struct dvb_pll_desc dvb_pll_thomson_dtt7579 = { 64static struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
48 .name = "Thomson dtt7579", 65 .name = "Thomson dtt7579",
49 .min = 177000000, 66 .min = 177000000,
50 .max = 858000000, 67 .max = 858000000,
@@ -58,9 +75,8 @@ struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
58 { 999999999, 166667, 0xf4, 0x08 }, 75 { 999999999, 166667, 0xf4, 0x08 },
59 }, 76 },
60}; 77};
61EXPORT_SYMBOL(dvb_pll_thomson_dtt7579);
62 78
63struct dvb_pll_desc dvb_pll_thomson_dtt7610 = { 79static struct dvb_pll_desc dvb_pll_thomson_dtt7610 = {
64 .name = "Thomson dtt7610", 80 .name = "Thomson dtt7610",
65 .min = 44000000, 81 .min = 44000000,
66 .max = 958000000, 82 .max = 958000000,
@@ -72,7 +88,6 @@ struct dvb_pll_desc dvb_pll_thomson_dtt7610 = {
72 { 999999999, 62500, 0x8e, 0x3c }, 88 { 999999999, 62500, 0x8e, 0x3c },
73 }, 89 },
74}; 90};
75EXPORT_SYMBOL(dvb_pll_thomson_dtt7610);
76 91
77static void thomson_dtt759x_bw(u8 *buf, 92static void thomson_dtt759x_bw(u8 *buf,
78 const struct dvb_frontend_parameters *params) 93 const struct dvb_frontend_parameters *params)
@@ -81,7 +96,7 @@ static void thomson_dtt759x_bw(u8 *buf,
81 buf[3] |= 0x10; 96 buf[3] |= 0x10;
82} 97}
83 98
84struct dvb_pll_desc dvb_pll_thomson_dtt759x = { 99static struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
85 .name = "Thomson dtt759x", 100 .name = "Thomson dtt759x",
86 .min = 177000000, 101 .min = 177000000,
87 .max = 896000000, 102 .max = 896000000,
@@ -97,9 +112,8 @@ struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
97 { 999999999, 166667, 0xfc, 0x08 }, 112 { 999999999, 166667, 0xfc, 0x08 },
98 }, 113 },
99}; 114};
100EXPORT_SYMBOL(dvb_pll_thomson_dtt759x);
101 115
102struct dvb_pll_desc dvb_pll_lg_z201 = { 116static struct dvb_pll_desc dvb_pll_lg_z201 = {
103 .name = "LG z201", 117 .name = "LG z201",
104 .min = 174000000, 118 .min = 174000000,
105 .max = 862000000, 119 .max = 862000000,
@@ -114,9 +128,8 @@ struct dvb_pll_desc dvb_pll_lg_z201 = {
114 { 999999999, 166667, 0xfc, 0x04 }, 128 { 999999999, 166667, 0xfc, 0x04 },
115 }, 129 },
116}; 130};
117EXPORT_SYMBOL(dvb_pll_lg_z201);
118 131
119struct dvb_pll_desc dvb_pll_microtune_4042 = { 132static struct dvb_pll_desc dvb_pll_microtune_4042 = {
120 .name = "Microtune 4042 FI5", 133 .name = "Microtune 4042 FI5",
121 .min = 57000000, 134 .min = 57000000,
122 .max = 858000000, 135 .max = 858000000,
@@ -128,9 +141,8 @@ struct dvb_pll_desc dvb_pll_microtune_4042 = {
128 { 999999999, 62500, 0x8e, 0x31 }, 141 { 999999999, 62500, 0x8e, 0x31 },
129 }, 142 },
130}; 143};
131EXPORT_SYMBOL(dvb_pll_microtune_4042);
132 144
133struct dvb_pll_desc dvb_pll_thomson_dtt761x = { 145static struct dvb_pll_desc dvb_pll_thomson_dtt761x = {
134 /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */ 146 /* DTT 7611 7611A 7612 7613 7613A 7614 7615 7615A */
135 .name = "Thomson dtt761x", 147 .name = "Thomson dtt761x",
136 .min = 57000000, 148 .min = 57000000,
@@ -144,9 +156,8 @@ struct dvb_pll_desc dvb_pll_thomson_dtt761x = {
144 { 999999999, 62500, 0x8e, 0x3c }, 156 { 999999999, 62500, 0x8e, 0x3c },
145 }, 157 },
146}; 158};
147EXPORT_SYMBOL(dvb_pll_thomson_dtt761x);
148 159
149struct dvb_pll_desc dvb_pll_unknown_1 = { 160static struct dvb_pll_desc dvb_pll_unknown_1 = {
150 .name = "unknown 1", /* used by dntv live dvb-t */ 161 .name = "unknown 1", /* used by dntv live dvb-t */
151 .min = 174000000, 162 .min = 174000000,
152 .max = 862000000, 163 .max = 862000000,
@@ -164,12 +175,11 @@ struct dvb_pll_desc dvb_pll_unknown_1 = {
164 { 999999999, 166667, 0xfc, 0x08 }, 175 { 999999999, 166667, 0xfc, 0x08 },
165 }, 176 },
166}; 177};
167EXPORT_SYMBOL(dvb_pll_unknown_1);
168 178
169/* Infineon TUA6010XS 179/* Infineon TUA6010XS
170 * used in Thomson Cable Tuner 180 * used in Thomson Cable Tuner
171 */ 181 */
172struct dvb_pll_desc dvb_pll_tua6010xs = { 182static struct dvb_pll_desc dvb_pll_tua6010xs = {
173 .name = "Infineon TUA6010XS", 183 .name = "Infineon TUA6010XS",
174 .min = 44250000, 184 .min = 44250000,
175 .max = 858000000, 185 .max = 858000000,
@@ -181,10 +191,9 @@ struct dvb_pll_desc dvb_pll_tua6010xs = {
181 { 999999999, 62500, 0x8e, 0x85 }, 191 { 999999999, 62500, 0x8e, 0x85 },
182 }, 192 },
183}; 193};
184EXPORT_SYMBOL(dvb_pll_tua6010xs);
185 194
186/* Panasonic env57h1xd5 (some Philips PLL ?) */ 195/* Panasonic env57h1xd5 (some Philips PLL ?) */
187struct dvb_pll_desc dvb_pll_env57h1xd5 = { 196static struct dvb_pll_desc dvb_pll_env57h1xd5 = {
188 .name = "Panasonic ENV57H1XD5", 197 .name = "Panasonic ENV57H1XD5",
189 .min = 44250000, 198 .min = 44250000,
190 .max = 858000000, 199 .max = 858000000,
@@ -197,7 +206,6 @@ struct dvb_pll_desc dvb_pll_env57h1xd5 = {
197 { 999999999, 166667, 0xc2, 0xa4 }, 206 { 999999999, 166667, 0xc2, 0xa4 },
198 }, 207 },
199}; 208};
200EXPORT_SYMBOL(dvb_pll_env57h1xd5);
201 209
202/* Philips TDA6650/TDA6651 210/* Philips TDA6650/TDA6651
203 * used in Panasonic ENV77H11D5 211 * used in Panasonic ENV77H11D5
@@ -208,7 +216,7 @@ static void tda665x_bw(u8 *buf, const struct dvb_frontend_parameters *params)
208 buf[3] |= 0x08; 216 buf[3] |= 0x08;
209} 217}
210 218
211struct dvb_pll_desc dvb_pll_tda665x = { 219static struct dvb_pll_desc dvb_pll_tda665x = {
212 .name = "Philips TDA6650/TDA6651", 220 .name = "Philips TDA6650/TDA6651",
213 .min = 44250000, 221 .min = 44250000,
214 .max = 858000000, 222 .max = 858000000,
@@ -231,7 +239,6 @@ struct dvb_pll_desc dvb_pll_tda665x = {
231 { 861000000, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ }, 239 { 861000000, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ },
232 } 240 }
233}; 241};
234EXPORT_SYMBOL(dvb_pll_tda665x);
235 242
236/* Infineon TUA6034 243/* Infineon TUA6034
237 * used in LG TDTP E102P 244 * used in LG TDTP E102P
@@ -242,7 +249,7 @@ static void tua6034_bw(u8 *buf, const struct dvb_frontend_parameters *params)
242 buf[3] |= 0x08; 249 buf[3] |= 0x08;
243} 250}
244 251
245struct dvb_pll_desc dvb_pll_tua6034 = { 252static struct dvb_pll_desc dvb_pll_tua6034 = {
246 .name = "Infineon TUA6034", 253 .name = "Infineon TUA6034",
247 .min = 44250000, 254 .min = 44250000,
248 .max = 858000000, 255 .max = 858000000,
@@ -255,12 +262,11 @@ struct dvb_pll_desc dvb_pll_tua6034 = {
255 { 999999999, 62500, 0xce, 0x04 }, 262 { 999999999, 62500, 0xce, 0x04 },
256 }, 263 },
257}; 264};
258EXPORT_SYMBOL(dvb_pll_tua6034);
259 265
260/* Infineon TUA6034 266/* Infineon TUA6034
261 * used in LG TDVS-H061F, LG TDVS-H062F and LG TDVS-H064F 267 * used in LG TDVS-H061F, LG TDVS-H062F and LG TDVS-H064F
262 */ 268 */
263struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf = { 269static struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf = {
264 .name = "LG TDVS-H06xF", 270 .name = "LG TDVS-H06xF",
265 .min = 54000000, 271 .min = 54000000,
266 .max = 863000000, 272 .max = 863000000,
@@ -273,7 +279,6 @@ struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf = {
273 { 999999999, 62500, 0xce, 0x04 }, 279 { 999999999, 62500, 0xce, 0x04 },
274 }, 280 },
275}; 281};
276EXPORT_SYMBOL(dvb_pll_lg_tdvs_h06xf);
277 282
278/* Philips FMD1216ME 283/* Philips FMD1216ME
279 * used in Medion Hybrid PCMCIA card and USB Box 284 * used in Medion Hybrid PCMCIA card and USB Box
@@ -285,7 +290,7 @@ static void fmd1216me_bw(u8 *buf, const struct dvb_frontend_parameters *params)
285 buf[3] |= 0x08; 290 buf[3] |= 0x08;
286} 291}
287 292
288struct dvb_pll_desc dvb_pll_fmd1216me = { 293static struct dvb_pll_desc dvb_pll_fmd1216me = {
289 .name = "Philips FMD1216ME", 294 .name = "Philips FMD1216ME",
290 .min = 50870000, 295 .min = 50870000,
291 .max = 858000000, 296 .max = 858000000,
@@ -304,7 +309,6 @@ struct dvb_pll_desc dvb_pll_fmd1216me = {
304 { 999999999, 166667, 0xfc, 0x44 }, 309 { 999999999, 166667, 0xfc, 0x44 },
305 } 310 }
306}; 311};
307EXPORT_SYMBOL(dvb_pll_fmd1216me);
308 312
309/* ALPS TDED4 313/* ALPS TDED4
310 * used in Nebula-Cards and USB boxes 314 * used in Nebula-Cards and USB boxes
@@ -315,7 +319,7 @@ static void tded4_bw(u8 *buf, const struct dvb_frontend_parameters *params)
315 buf[3] |= 0x04; 319 buf[3] |= 0x04;
316} 320}
317 321
318struct dvb_pll_desc dvb_pll_tded4 = { 322static struct dvb_pll_desc dvb_pll_tded4 = {
319 .name = "ALPS TDED4", 323 .name = "ALPS TDED4",
320 .min = 47000000, 324 .min = 47000000,
321 .max = 863000000, 325 .max = 863000000,
@@ -329,12 +333,11 @@ struct dvb_pll_desc dvb_pll_tded4 = {
329 { 999999999, 166667, 0x85, 0x88 }, 333 { 999999999, 166667, 0x85, 0x88 },
330 } 334 }
331}; 335};
332EXPORT_SYMBOL(dvb_pll_tded4);
333 336
334/* ALPS TDHU2 337/* ALPS TDHU2
335 * used in AverTVHD MCE A180 338 * used in AverTVHD MCE A180
336 */ 339 */
337struct dvb_pll_desc dvb_pll_tdhu2 = { 340static struct dvb_pll_desc dvb_pll_tdhu2 = {
338 .name = "ALPS TDHU2", 341 .name = "ALPS TDHU2",
339 .min = 54000000, 342 .min = 54000000,
340 .max = 864000000, 343 .max = 864000000,
@@ -347,7 +350,6 @@ struct dvb_pll_desc dvb_pll_tdhu2 = {
347 { 999999999, 62500, 0x85, 0x88 }, 350 { 999999999, 62500, 0x85, 0x88 },
348 } 351 }
349}; 352};
350EXPORT_SYMBOL(dvb_pll_tdhu2);
351 353
352/* Philips TUV1236D 354/* Philips TUV1236D
353 * used in ATI HDTV Wonder 355 * used in ATI HDTV Wonder
@@ -365,7 +367,7 @@ static void tuv1236d_rf(u8 *buf, const struct dvb_frontend_parameters *params)
365 } 367 }
366} 368}
367 369
368struct dvb_pll_desc dvb_pll_tuv1236d = { 370static struct dvb_pll_desc dvb_pll_tuv1236d = {
369 .name = "Philips TUV1236D", 371 .name = "Philips TUV1236D",
370 .min = 54000000, 372 .min = 54000000,
371 .max = 864000000, 373 .max = 864000000,
@@ -378,12 +380,11 @@ struct dvb_pll_desc dvb_pll_tuv1236d = {
378 { 999999999, 62500, 0xc6, 0x44 }, 380 { 999999999, 62500, 0xc6, 0x44 },
379 }, 381 },
380}; 382};
381EXPORT_SYMBOL(dvb_pll_tuv1236d);
382 383
383/* Samsung TBMV30111IN / TBMV30712IN1 384/* Samsung TBMV30111IN / TBMV30712IN1
384 * used in Air2PC ATSC - 2nd generation (nxt2002) 385 * used in Air2PC ATSC - 2nd generation (nxt2002)
385 */ 386 */
386struct dvb_pll_desc dvb_pll_samsung_tbmv = { 387static struct dvb_pll_desc dvb_pll_samsung_tbmv = {
387 .name = "Samsung TBMV30111IN / TBMV30712IN1", 388 .name = "Samsung TBMV30111IN / TBMV30712IN1",
388 .min = 54000000, 389 .min = 54000000,
389 .max = 860000000, 390 .max = 860000000,
@@ -398,12 +399,11 @@ struct dvb_pll_desc dvb_pll_samsung_tbmv = {
398 { 999999999, 166667, 0xfc, 0x02 }, 399 { 999999999, 166667, 0xfc, 0x02 },
399 } 400 }
400}; 401};
401EXPORT_SYMBOL(dvb_pll_samsung_tbmv);
402 402
403/* 403/*
404 * Philips SD1878 Tuner. 404 * Philips SD1878 Tuner.
405 */ 405 */
406struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = { 406static struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
407 .name = "Philips SD1878", 407 .name = "Philips SD1878",
408 .min = 950000, 408 .min = 950000,
409 .max = 2150000, 409 .max = 2150000,
@@ -416,7 +416,6 @@ struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
416 { 2150000, 500, 0xc4, 0xc0}, 416 { 2150000, 500, 0xc4, 0xc0},
417 }, 417 },
418}; 418};
419EXPORT_SYMBOL(dvb_pll_philips_sd1878_tda8261);
420 419
421/* 420/*
422 * Philips TD1316 Tuner. 421 * Philips TD1316 Tuner.
@@ -440,7 +439,7 @@ static void td1316_bw(u8 *buf, const struct dvb_frontend_parameters *params)
440 buf[3] |= 1 << 3; 439 buf[3] |= 1 << 3;
441} 440}
442 441
443struct dvb_pll_desc dvb_pll_philips_td1316 = { 442static struct dvb_pll_desc dvb_pll_philips_td1316 = {
444 .name = "Philips TD1316", 443 .name = "Philips TD1316",
445 .min = 87000000, 444 .min = 87000000,
446 .max = 895000000, 445 .max = 895000000,
@@ -459,10 +458,9 @@ struct dvb_pll_desc dvb_pll_philips_td1316 = {
459 { 858834000, 166667, 0xca, 0xe0}, 458 { 858834000, 166667, 0xca, 0xe0},
460 }, 459 },
461}; 460};
462EXPORT_SYMBOL(dvb_pll_philips_td1316);
463 461
464/* FE6600 used on DViCO Hybrid */ 462/* FE6600 used on DViCO Hybrid */
465struct dvb_pll_desc dvb_pll_thomson_fe6600 = { 463static struct dvb_pll_desc dvb_pll_thomson_fe6600 = {
466 .name = "Thomson FE6600", 464 .name = "Thomson FE6600",
467 .min = 44250000, 465 .min = 44250000,
468 .max = 858000000, 466 .max = 858000000,
@@ -475,14 +473,14 @@ struct dvb_pll_desc dvb_pll_thomson_fe6600 = {
475 { 999999999, 166667, 0xf4, 0x18 }, 473 { 999999999, 166667, 0xf4, 0x18 },
476 } 474 }
477}; 475};
478EXPORT_SYMBOL(dvb_pll_thomson_fe6600); 476
479static void opera1_bw(u8 *buf, const struct dvb_frontend_parameters *params) 477static void opera1_bw(u8 *buf, const struct dvb_frontend_parameters *params)
480{ 478{
481 if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ) 479 if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ)
482 buf[2] |= 0x08; 480 buf[2] |= 0x08;
483} 481}
484 482
485struct dvb_pll_desc dvb_pll_opera1 = { 483static struct dvb_pll_desc dvb_pll_opera1 = {
486 .name = "Opera Tuner", 484 .name = "Opera Tuner",
487 .min = 900000, 485 .min = 900000,
488 .max = 2250000, 486 .max = 2250000,
@@ -500,7 +498,35 @@ struct dvb_pll_desc dvb_pll_opera1 = {
500 { 2250000, 500, 0xe5, 0xc4 }, 498 { 2250000, 500, 0xe5, 0xc4 },
501 } 499 }
502}; 500};
503EXPORT_SYMBOL(dvb_pll_opera1); 501
502/* ----------------------------------------------------------- */
503
504static struct dvb_pll_desc *pll_list[] = {
505 [DVB_PLL_UNDEFINED] = NULL,
506 [DVB_PLL_THOMSON_DTT7579] = &dvb_pll_thomson_dtt7579,
507 [DVB_PLL_THOMSON_DTT759X] = &dvb_pll_thomson_dtt759x,
508 [DVB_PLL_THOMSON_DTT7610] = &dvb_pll_thomson_dtt7610,
509 [DVB_PLL_LG_Z201] = &dvb_pll_lg_z201,
510 [DVB_PLL_MICROTUNE_4042] = &dvb_pll_microtune_4042,
511 [DVB_PLL_THOMSON_DTT761X] = &dvb_pll_thomson_dtt761x,
512 [DVB_PLL_UNKNOWN_1] = &dvb_pll_unknown_1,
513 [DVB_PLL_TUA6010XS] = &dvb_pll_tua6010xs,
514 [DVB_PLL_ENV57H1XD5] = &dvb_pll_env57h1xd5,
515 [DVB_PLL_TUA6034] = &dvb_pll_tua6034,
516 [DVB_PLL_LG_TDVS_H06XF] = &dvb_pll_lg_tdvs_h06xf,
517 [DVB_PLL_TDA665X] = &dvb_pll_tda665x,
518 [DVB_PLL_FMD1216ME] = &dvb_pll_fmd1216me,
519 [DVB_PLL_TDED4] = &dvb_pll_tded4,
520 [DVB_PLL_TUV1236D] = &dvb_pll_tuv1236d,
521 [DVB_PLL_TDHU2] = &dvb_pll_tdhu2,
522 [DVB_PLL_SAMSUNG_TBMV] = &dvb_pll_samsung_tbmv,
523 [DVB_PLL_PHILIPS_SD1878_TDA8261] = &dvb_pll_philips_sd1878_tda8261,
524 [DVB_PLL_PHILIPS_TD1316] = &dvb_pll_philips_td1316,
525 [DVB_PLL_THOMSON_FE6600] = &dvb_pll_thomson_fe6600,
526 [DVB_PLL_OPERA1] = &dvb_pll_opera1,
527};
528
529/* ----------------------------------------------------------- */
504 530
505struct dvb_pll_priv { 531struct dvb_pll_priv {
506 /* i2c details */ 532 /* i2c details */
@@ -702,13 +728,18 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = {
702 728
703struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, 729struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
704 struct i2c_adapter *i2c, 730 struct i2c_adapter *i2c,
705 struct dvb_pll_desc *desc) 731 unsigned int pll_desc_id)
706{ 732{
707 u8 b1 [] = { 0 }; 733 u8 b1 [] = { 0 };
708 struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, 734 struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD,
709 .buf = b1, .len = 1 }; 735 .buf = b1, .len = 1 };
710 struct dvb_pll_priv *priv = NULL; 736 struct dvb_pll_priv *priv = NULL;
711 int ret; 737 int ret;
738 struct dvb_pll_desc *desc;
739
740 BUG_ON(pll_desc_id < 1 || pll_desc_id >= ARRAY_SIZE(pll_list));
741
742 desc = pll_list[pll_desc_id];
712 743
713 if (i2c != NULL) { 744 if (i2c != NULL) {
714 if (fe->ops.i2c_gate_ctrl) 745 if (fe->ops.i2c_gate_ctrl)
diff --git a/drivers/media/dvb/frontends/dvb-pll.h b/drivers/media/dvb/frontends/dvb-pll.h
index a88ec86bd3b2..66464e1e1a00 100644
--- a/drivers/media/dvb/frontends/dvb-pll.h
+++ b/drivers/media/dvb/frontends/dvb-pll.h
@@ -8,47 +8,28 @@
8#include <linux/i2c.h> 8#include <linux/i2c.h>
9#include "dvb_frontend.h" 9#include "dvb_frontend.h"
10 10
11struct dvb_pll_desc { 11#define DVB_PLL_UNDEFINED 0
12 char *name; 12#define DVB_PLL_THOMSON_DTT7579 1
13 u32 min; 13#define DVB_PLL_THOMSON_DTT759X 2
14 u32 max; 14#define DVB_PLL_THOMSON_DTT7610 3
15 u32 iffreq; 15#define DVB_PLL_LG_Z201 4
16 void (*set)(u8 *buf, const struct dvb_frontend_parameters *params); 16#define DVB_PLL_MICROTUNE_4042 5
17 u8 *initdata; 17#define DVB_PLL_THOMSON_DTT761X 6
18 u8 *sleepdata; 18#define DVB_PLL_UNKNOWN_1 7
19 int count; 19#define DVB_PLL_TUA6010XS 8
20 struct { 20#define DVB_PLL_ENV57H1XD5 9
21 u32 limit; 21#define DVB_PLL_TUA6034 10
22 u32 stepsize; 22#define DVB_PLL_LG_TDVS_H06XF 11
23 u8 config; 23#define DVB_PLL_TDA665X 12
24 u8 cb; 24#define DVB_PLL_FMD1216ME 13
25 } entries[12]; 25#define DVB_PLL_TDED4 14
26}; 26#define DVB_PLL_TUV1236D 15
27 27#define DVB_PLL_TDHU2 16
28extern struct dvb_pll_desc dvb_pll_thomson_dtt7579; 28#define DVB_PLL_SAMSUNG_TBMV 17
29extern struct dvb_pll_desc dvb_pll_thomson_dtt759x; 29#define DVB_PLL_PHILIPS_SD1878_TDA8261 18
30extern struct dvb_pll_desc dvb_pll_thomson_dtt7610; 30#define DVB_PLL_PHILIPS_TD1316 19
31extern struct dvb_pll_desc dvb_pll_lg_z201; 31#define DVB_PLL_THOMSON_FE6600 20
32extern struct dvb_pll_desc dvb_pll_microtune_4042; 32#define DVB_PLL_OPERA1 21
33extern struct dvb_pll_desc dvb_pll_thomson_dtt761x;
34extern struct dvb_pll_desc dvb_pll_unknown_1;
35
36extern struct dvb_pll_desc dvb_pll_tua6010xs;
37extern struct dvb_pll_desc dvb_pll_env57h1xd5;
38extern struct dvb_pll_desc dvb_pll_tua6034;
39extern struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf;
40extern struct dvb_pll_desc dvb_pll_tda665x;
41extern struct dvb_pll_desc dvb_pll_fmd1216me;
42extern struct dvb_pll_desc dvb_pll_tded4;
43
44extern struct dvb_pll_desc dvb_pll_tuv1236d;
45extern struct dvb_pll_desc dvb_pll_tdhu2;
46extern struct dvb_pll_desc dvb_pll_samsung_tbmv;
47extern struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261;
48extern struct dvb_pll_desc dvb_pll_philips_td1316;
49
50extern struct dvb_pll_desc dvb_pll_thomson_fe6600;
51extern struct dvb_pll_desc dvb_pll_opera1;
52 33
53/** 34/**
54 * Attach a dvb-pll to the supplied frontend structure. 35 * Attach a dvb-pll to the supplied frontend structure.
@@ -56,19 +37,19 @@ extern struct dvb_pll_desc dvb_pll_opera1;
56 * @param fe Frontend to attach to. 37 * @param fe Frontend to attach to.
57 * @param pll_addr i2c address of the PLL (if used). 38 * @param pll_addr i2c address of the PLL (if used).
58 * @param i2c i2c adapter to use (set to NULL if not used). 39 * @param i2c i2c adapter to use (set to NULL if not used).
59 * @param desc dvb_pll_desc to use. 40 * @param pll_desc_id dvb_pll_desc to use.
60 * @return Frontend pointer on success, NULL on failure 41 * @return Frontend pointer on success, NULL on failure
61 */ 42 */
62#if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE)) 43#if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE))
63extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, 44extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
64 int pll_addr, 45 int pll_addr,
65 struct i2c_adapter *i2c, 46 struct i2c_adapter *i2c,
66 struct dvb_pll_desc *desc); 47 unsigned int pll_desc_id);
67#else 48#else
68static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, 49static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
69 int pll_addr, 50 int pll_addr,
70 struct i2c_adapter *i2c, 51 struct i2c_adapter *i2c,
71 struct dvb_pll_desc *desc) 52 unsigned int pll_desc_id)
72{ 53{
73 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); 54 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
74 return NULL; 55 return NULL;
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig
index 7751628e1415..6d53289b3276 100644
--- a/drivers/media/dvb/ttpci/Kconfig
+++ b/drivers/media/dvb/ttpci/Kconfig
@@ -108,7 +108,7 @@ config DVB_BUDGET_AV
108 tristate "Budget cards with analog video inputs" 108 tristate "Budget cards with analog video inputs"
109 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 109 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1
110 select VIDEO_SAA7146_VV 110 select VIDEO_SAA7146_VV
111 select DVB_PLL 111 select DVB_PLL if !DVB_FE_CUSTOMISE
112 select DVB_STV0299 if !DVB_FE_CUSTOMISE 112 select DVB_STV0299 if !DVB_FE_CUSTOMISE
113 select DVB_TDA1004X if !DVB_FE_CUSTOMISE 113 select DVB_TDA1004X if !DVB_FE_CUSTOMISE
114 select DVB_TDA10021 if !DVB_FE_CUSTOMISE 114 select DVB_TDA10021 if !DVB_FE_CUSTOMISE
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 398caaf62b9c..0aee7a13a070 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -966,7 +966,7 @@ static void frontend_init(struct budget_av *budget_av)
966 if (fe) { 966 if (fe) {
967 dvb_attach(dvb_pll_attach, fe, 0x60, 967 dvb_attach(dvb_pll_attach, fe, 0x60,
968 &budget_av->budget.i2c_adap, 968 &budget_av->budget.i2c_adap,
969 &dvb_pll_philips_sd1878_tda8261); 969 DVB_PLL_PHILIPS_SD1878_TDA8261);
970 } 970 }
971 break; 971 break;
972 972
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig
index 0f9d96963618..f750a543c961 100644
--- a/drivers/media/video/cx88/Kconfig
+++ b/drivers/media/video/cx88/Kconfig
@@ -47,7 +47,7 @@ config VIDEO_CX88_DVB
47 tristate "DVB/ATSC Support for cx2388x based TV cards" 47 tristate "DVB/ATSC Support for cx2388x based TV cards"
48 depends on VIDEO_CX88 && DVB_CORE 48 depends on VIDEO_CX88 && DVB_CORE
49 select VIDEO_BUF_DVB 49 select VIDEO_BUF_DVB
50 select DVB_PLL 50 select DVB_PLL if !DVB_FE_CUSTOMISE
51 select DVB_MT352 if !DVB_FE_CUSTOMISE 51 select DVB_MT352 if !DVB_FE_CUSTOMISE
52 select DVB_ZL10353 if !DVB_FE_CUSTOMISE 52 select DVB_ZL10353 if !DVB_FE_CUSTOMISE
53 select DVB_OR51132 if !DVB_FE_CUSTOMISE 53 select DVB_OR51132 if !DVB_FE_CUSTOMISE
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index c253e20087ce..1773b40467dc 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -386,7 +386,7 @@ static int dvb_register(struct cx8802_dev *dev)
386 if (dev->dvb.frontend != NULL) { 386 if (dev->dvb.frontend != NULL) {
387 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 387 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
388 &dev->core->i2c_adap, 388 &dev->core->i2c_adap,
389 &dvb_pll_thomson_dtt759x); 389 DVB_PLL_THOMSON_DTT759X);
390 } 390 }
391 break; 391 break;
392 case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: 392 case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
@@ -399,7 +399,7 @@ static int dvb_register(struct cx8802_dev *dev)
399 if (dev->dvb.frontend != NULL) { 399 if (dev->dvb.frontend != NULL) {
400 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, 400 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
401 &dev->core->i2c_adap, 401 &dev->core->i2c_adap,
402 &dvb_pll_thomson_dtt7579); 402 DVB_PLL_THOMSON_DTT7579);
403 } 403 }
404 break; 404 break;
405 case CX88_BOARD_WINFAST_DTV2000H: 405 case CX88_BOARD_WINFAST_DTV2000H:
@@ -412,7 +412,7 @@ static int dvb_register(struct cx8802_dev *dev)
412 &dev->core->i2c_adap); 412 &dev->core->i2c_adap);
413 if (dev->dvb.frontend != NULL) { 413 if (dev->dvb.frontend != NULL) {
414 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 414 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
415 &dev->core->i2c_adap, &dvb_pll_fmd1216me); 415 &dev->core->i2c_adap, DVB_PLL_FMD1216ME);
416 } 416 }
417 break; 417 break;
418 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: 418 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
@@ -421,7 +421,7 @@ static int dvb_register(struct cx8802_dev *dev)
421 &dev->core->i2c_adap); 421 &dev->core->i2c_adap);
422 if (dev->dvb.frontend != NULL) { 422 if (dev->dvb.frontend != NULL) {
423 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, 423 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
424 NULL, &dvb_pll_thomson_dtt7579); 424 NULL, DVB_PLL_THOMSON_DTT7579);
425 break; 425 break;
426 } 426 }
427 /* ZL10353 replaces MT352 on later cards */ 427 /* ZL10353 replaces MT352 on later cards */
@@ -430,7 +430,7 @@ static int dvb_register(struct cx8802_dev *dev)
430 &dev->core->i2c_adap); 430 &dev->core->i2c_adap);
431 if (dev->dvb.frontend != NULL) { 431 if (dev->dvb.frontend != NULL) {
432 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60, 432 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
433 NULL, &dvb_pll_thomson_dtt7579); 433 NULL, DVB_PLL_THOMSON_DTT7579);
434 } 434 }
435 break; 435 break;
436 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: 436 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
@@ -441,7 +441,7 @@ static int dvb_register(struct cx8802_dev *dev)
441 &dev->core->i2c_adap); 441 &dev->core->i2c_adap);
442 if (dev->dvb.frontend != NULL) { 442 if (dev->dvb.frontend != NULL) {
443 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 443 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
444 NULL, &dvb_pll_thomson_dtt7579); 444 NULL, DVB_PLL_THOMSON_DTT7579);
445 break; 445 break;
446 } 446 }
447 /* ZL10353 replaces MT352 on later cards */ 447 /* ZL10353 replaces MT352 on later cards */
@@ -450,7 +450,7 @@ static int dvb_register(struct cx8802_dev *dev)
450 &dev->core->i2c_adap); 450 &dev->core->i2c_adap);
451 if (dev->dvb.frontend != NULL) { 451 if (dev->dvb.frontend != NULL) {
452 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 452 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
453 NULL, &dvb_pll_thomson_dtt7579); 453 NULL, DVB_PLL_THOMSON_DTT7579);
454 } 454 }
455 break; 455 break;
456 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: 456 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
@@ -459,7 +459,7 @@ static int dvb_register(struct cx8802_dev *dev)
459 &dev->core->i2c_adap); 459 &dev->core->i2c_adap);
460 if (dev->dvb.frontend != NULL) { 460 if (dev->dvb.frontend != NULL) {
461 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 461 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
462 NULL, &dvb_pll_lg_z201); 462 NULL, DVB_PLL_LG_Z201);
463 } 463 }
464 break; 464 break;
465 case CX88_BOARD_KWORLD_DVB_T: 465 case CX88_BOARD_KWORLD_DVB_T:
@@ -470,7 +470,7 @@ static int dvb_register(struct cx8802_dev *dev)
470 &dev->core->i2c_adap); 470 &dev->core->i2c_adap);
471 if (dev->dvb.frontend != NULL) { 471 if (dev->dvb.frontend != NULL) {
472 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 472 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
473 NULL, &dvb_pll_unknown_1); 473 NULL, DVB_PLL_UNKNOWN_1);
474 } 474 }
475 break; 475 break;
476 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: 476 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
@@ -479,7 +479,7 @@ static int dvb_register(struct cx8802_dev *dev)
479 &((struct vp3054_i2c_state *)dev->card_priv)->adap); 479 &((struct vp3054_i2c_state *)dev->card_priv)->adap);
480 if (dev->dvb.frontend != NULL) { 480 if (dev->dvb.frontend != NULL) {
481 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 481 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
482 &dev->core->i2c_adap, &dvb_pll_fmd1216me); 482 &dev->core->i2c_adap, DVB_PLL_FMD1216ME);
483 } 483 }
484#else 484#else
485 printk("%s: built without vp3054 support\n", dev->core->name); 485 printk("%s: built without vp3054 support\n", dev->core->name);
@@ -492,7 +492,7 @@ static int dvb_register(struct cx8802_dev *dev)
492 if (dev->dvb.frontend != NULL) { 492 if (dev->dvb.frontend != NULL) {
493 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 493 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
494 &dev->core->i2c_adap, 494 &dev->core->i2c_adap,
495 &dvb_pll_thomson_fe6600); 495 DVB_PLL_THOMSON_FE6600);
496 } 496 }
497 break; 497 break;
498 case CX88_BOARD_PCHDTV_HD3000: 498 case CX88_BOARD_PCHDTV_HD3000:
@@ -501,7 +501,7 @@ static int dvb_register(struct cx8802_dev *dev)
501 if (dev->dvb.frontend != NULL) { 501 if (dev->dvb.frontend != NULL) {
502 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 502 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
503 &dev->core->i2c_adap, 503 &dev->core->i2c_adap,
504 &dvb_pll_thomson_dtt761x); 504 DVB_PLL_THOMSON_DTT761X);
505 } 505 }
506 break; 506 break;
507 case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: 507 case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q:
@@ -523,7 +523,7 @@ static int dvb_register(struct cx8802_dev *dev)
523 if (dev->dvb.frontend != NULL) { 523 if (dev->dvb.frontend != NULL) {
524 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 524 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
525 &dev->core->i2c_adap, 525 &dev->core->i2c_adap,
526 &dvb_pll_microtune_4042); 526 DVB_PLL_MICROTUNE_4042);
527 } 527 }
528 } 528 }
529 break; 529 break;
@@ -543,7 +543,7 @@ static int dvb_register(struct cx8802_dev *dev)
543 if (dev->dvb.frontend != NULL) { 543 if (dev->dvb.frontend != NULL) {
544 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 544 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
545 &dev->core->i2c_adap, 545 &dev->core->i2c_adap,
546 &dvb_pll_thomson_dtt761x); 546 DVB_PLL_THOMSON_DTT761X);
547 } 547 }
548 } 548 }
549 break; 549 break;
@@ -563,7 +563,7 @@ static int dvb_register(struct cx8802_dev *dev)
563 if (dev->dvb.frontend != NULL) { 563 if (dev->dvb.frontend != NULL) {
564 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 564 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
565 &dev->core->i2c_adap, 565 &dev->core->i2c_adap,
566 &dvb_pll_lg_tdvs_h06xf); 566 DVB_PLL_LG_TDVS_H06XF);
567 } 567 }
568 } 568 }
569 break; 569 break;
@@ -583,7 +583,7 @@ static int dvb_register(struct cx8802_dev *dev)
583 if (dev->dvb.frontend != NULL) { 583 if (dev->dvb.frontend != NULL) {
584 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 584 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
585 &dev->core->i2c_adap, 585 &dev->core->i2c_adap,
586 &dvb_pll_lg_tdvs_h06xf); 586 DVB_PLL_LG_TDVS_H06XF);
587 } 587 }
588 } 588 }
589 break; 589 break;
@@ -593,7 +593,7 @@ static int dvb_register(struct cx8802_dev *dev)
593 &dev->core->i2c_adap); 593 &dev->core->i2c_adap);
594 if (dev->dvb.frontend != NULL) { 594 if (dev->dvb.frontend != NULL) {
595 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 595 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
596 NULL, &dvb_pll_tuv1236d); 596 NULL, DVB_PLL_TUV1236D);
597 } 597 }
598 break; 598 break;
599 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: 599 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig
index 309dca368f4a..9f1417a4f7d2 100644
--- a/drivers/media/video/saa7134/Kconfig
+++ b/drivers/media/video/saa7134/Kconfig
@@ -40,7 +40,7 @@ config VIDEO_SAA7134_DVB
40 depends on VIDEO_SAA7134 && DVB_CORE 40 depends on VIDEO_SAA7134 && DVB_CORE
41 select VIDEO_BUF_DVB 41 select VIDEO_BUF_DVB
42 select FW_LOADER 42 select FW_LOADER
43 select DVB_PLL 43 select DVB_PLL if !DVB_FE_CUSTOMISE
44 select DVB_MT352 if !DVB_FE_CUSTOMISE 44 select DVB_MT352 if !DVB_FE_CUSTOMISE
45 select DVB_TDA1004X if !DVB_FE_CUSTOMISE 45 select DVB_TDA1004X if !DVB_FE_CUSTOMISE
46 select DVB_NXT200X if !DVB_FE_CUSTOMISE 46 select DVB_NXT200X if !DVB_FE_CUSTOMISE
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 3a28b4ca42eb..1f6bd3300715 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -855,7 +855,7 @@ static int dvb_init(struct saa7134_dev *dev)
855 &dev->i2c_adap); 855 &dev->i2c_adap);
856 if (dev->dvb.frontend) { 856 if (dev->dvb.frontend) {
857 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 857 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
858 NULL, &dvb_pll_philips_td1316); 858 NULL, DVB_PLL_PHILIPS_TD1316);
859 } 859 }
860 break; 860 break;
861 case SAA7134_BOARD_MD7134: 861 case SAA7134_BOARD_MD7134:
@@ -864,7 +864,7 @@ static int dvb_init(struct saa7134_dev *dev)
864 &dev->i2c_adap); 864 &dev->i2c_adap);
865 if (dev->dvb.frontend) { 865 if (dev->dvb.frontend) {
866 dvb_attach(dvb_pll_attach, dev->dvb.frontend, medion_cardbus.tuner_address, 866 dvb_attach(dvb_pll_attach, dev->dvb.frontend, medion_cardbus.tuner_address,
867 &dev->i2c_adap, &dvb_pll_fmd1216me); 867 &dev->i2c_adap, DVB_PLL_FMD1216ME);
868 } 868 }
869 break; 869 break;
870 case SAA7134_BOARD_PHILIPS_TOUGH: 870 case SAA7134_BOARD_PHILIPS_TOUGH:
@@ -962,7 +962,7 @@ static int dvb_init(struct saa7134_dev *dev)
962 &dev->i2c_adap); 962 &dev->i2c_adap);
963 if (dev->dvb.frontend) { 963 if (dev->dvb.frontend) {
964 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 964 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
965 NULL, &dvb_pll_tdhu2); 965 NULL, DVB_PLL_TDHU2);
966 } 966 }
967 break; 967 break;
968 case SAA7134_BOARD_KWORLD_ATSC110: 968 case SAA7134_BOARD_KWORLD_ATSC110:
@@ -970,7 +970,7 @@ static int dvb_init(struct saa7134_dev *dev)
970 &dev->i2c_adap); 970 &dev->i2c_adap);
971 if (dev->dvb.frontend) { 971 if (dev->dvb.frontend) {
972 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 972 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
973 NULL, &dvb_pll_tuv1236d); 973 NULL, DVB_PLL_TUV1236D);
974 } 974 }
975 break; 975 break;
976 case SAA7134_BOARD_FLYDVBS_LR300: 976 case SAA7134_BOARD_FLYDVBS_LR300:
@@ -995,7 +995,7 @@ static int dvb_init(struct saa7134_dev *dev)
995 dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep; 995 dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep;
996 996
997 dvb_attach(dvb_pll_attach, dev->dvb.frontend, medion_cardbus.tuner_address, 997 dvb_attach(dvb_pll_attach, dev->dvb.frontend, medion_cardbus.tuner_address,
998 &dev->i2c_adap, &dvb_pll_fmd1216me); 998 &dev->i2c_adap, DVB_PLL_FMD1216ME);
999 } 999 }
1000 break; 1000 break;
1001 case SAA7134_BOARD_VIDEOMATE_DVBT_200A: 1001 case SAA7134_BOARD_VIDEOMATE_DVBT_200A: