aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-05-09 14:58:17 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-18 13:23:25 -0400
commitfbfee8684ff235c8cc4e8859913a017dabd59c03 (patch)
tree5102e0ba8c9901bd2fe85a013770b7e099998648 /drivers
parent9bc7c04852194377fc276072359a19b5134250cc (diff)
V4L/DVB (5651): Dibusb-mb: convert pll handling to properly use dvb-pll
moved tda665x pll_init into dvb_pll_desc dvb_pll_tda665x.initdata convert handling of tda665x and tua6010xs to properly use dvb-pll Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mb.c21
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c1
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index 7a6ae8f482e0..6de459550dbf 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -24,9 +24,6 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_adapter *adap)
24 if ((adap->fe = dib3000mb_attach(&demod_cfg,&adap->dev->i2c_adap,&st->ops)) == NULL) 24 if ((adap->fe = dib3000mb_attach(&demod_cfg,&adap->dev->i2c_adap,&st->ops)) == NULL)
25 return -ENODEV; 25 return -ENODEV;
26 26
27 adap->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c;
28 adap->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
29
30 adap->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; 27 adap->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
31 28
32 return 0; 29 return 0;
@@ -34,8 +31,15 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_adapter *adap)
34 31
35static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap) 32static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap)
36{ 33{
37 adap->pll_addr = 0x61; 34 dvb_attach(dvb_pll_attach, adap->fe, 0x61, &adap->dev->i2c_adap,
38 adap->pll_desc = &dvb_pll_tua6010xs; 35 &dvb_pll_tua6010xs);
36 return 0;
37}
38
39static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap)
40{
41 dvb_attach(dvb_pll_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
42 &dvb_pll_tda665x);
39 return 0; 43 return 0;
40} 44}
41 45
@@ -67,13 +71,10 @@ static int dibusb_tuner_probe_and_attach(struct dvb_usb_adapter *adap)
67 71
68 if (b2[0] == 0xfe) { 72 if (b2[0] == 0xfe) {
69 info("This device has the Thomson Cable onboard. Which is default."); 73 info("This device has the Thomson Cable onboard. Which is default.");
70 dibusb_thomson_tuner_attach(adap); 74 ret = dibusb_thomson_tuner_attach(adap);
71 } else { 75 } else {
72 u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab };
73 info("This device has the Panasonic ENV77H11D5 onboard."); 76 info("This device has the Panasonic ENV77H11D5 onboard.");
74 adap->pll_addr = 0x60; 77 ret = dibusb_panasonic_tuner_attach(adap);
75 memcpy(adap->pll_init,bpll,4);
76 adap->pll_desc = &dvb_pll_tda665x;
77 } 78 }
78 79
79 return ret; 80 return ret;
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index 1363cc8c906e..fc440b1e2449 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -208,6 +208,7 @@ struct dvb_pll_desc dvb_pll_tda665x = {
208 .max = 858000000, 208 .max = 858000000,
209 .set = tda665x_bw, 209 .set = tda665x_bw,
210 .iffreq= 36166667, 210 .iffreq= 36166667,
211 .initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
211 .count = 12, 212 .count = 12,
212 .entries = { 213 .entries = {
213 { 93834000, 166667, 0xca, 0x61 /* 011 0 0 0 01 */ }, 214 { 93834000, 166667, 0xca, 0x61 /* 011 0 0 0 01 */ },