aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-05-07 00:48:56 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-18 13:23:16 -0400
commit9b98fd28b4a181cafaa5247a04d1be6d2ca7c863 (patch)
tree9239fbfcc3edff9242b81772e969b7424f6fbc5b /drivers/media/dvb/ttpci
parent8511df9ec2ef4c33a6b1e76527d5b47da8bc0bb6 (diff)
V4L/DVB (5635): Budget-av: convert philips sd1878 / tda8261 to use dvb-pll
removed philips_sd1878_tda8261_tuner_set_params, using dvb_pll_attach, instead. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 8de19cefb24d..1b590b2f8a5a 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -828,28 +828,6 @@ static u8 philips_sd1878_inittab[] = {
828 0xff, 0xff 828 0xff, 0xff
829}; 829};
830 830
831static int philips_sd1878_tda8261_tuner_set_params(struct dvb_frontend *fe,
832 struct dvb_frontend_parameters *params)
833{
834 u8 buf[4];
835 int rc;
836 struct i2c_msg tuner_msg = {.addr=0x60,.flags=0,.buf=buf,.len=sizeof(buf)};
837 struct budget *budget = (struct budget *) fe->dvb->priv;
838
839 if((params->frequency < 950000) || (params->frequency > 2150000))
840 return -EINVAL;
841
842 rc=dvb_pll_configure(&dvb_pll_philips_sd1878_tda8261, buf, params);
843 if(rc < 0) return rc;
844
845 if (fe->ops.i2c_gate_ctrl)
846 fe->ops.i2c_gate_ctrl(fe, 1);
847 if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
848 return -EIO;
849
850 return 0;
851}
852
853static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe, 831static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe,
854 u32 srate, u32 ratio) 832 u32 srate, u32 ratio)
855{ 833{
@@ -984,7 +962,9 @@ static void frontend_init(struct budget_av *budget_av)
984 fe = dvb_attach(stv0299_attach, &philips_sd1878_config, 962 fe = dvb_attach(stv0299_attach, &philips_sd1878_config,
985 &budget_av->budget.i2c_adap); 963 &budget_av->budget.i2c_adap);
986 if (fe) { 964 if (fe) {
987 fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; 965 dvb_attach(dvb_pll_attach, fe, 0x60,
966 &budget_av->budget.i2c_adap,
967 &dvb_pll_philips_sd1878_tda8261);
988 } 968 }
989 break; 969 break;
990 970