aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-05-22 09:31:40 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:59:52 -0400
commita9686e0d204e3faa544434c709ccb599f8165252 (patch)
tree5641cf2bd9a5c4e4f4fec7fd0214b207a5277f25 /drivers/media/dvb/frontends
parentebfbc305bda90deadf73898493c707cce3b465e6 (diff)
V4L/DVB (3935): Add missing pll gate control calls
I'd missed some of these out, breaking the av7110 tuning. I then checked for more and added them in where necessary. They may not actually be necessary in all these locations, but if not, they'll simply have no effect. Add small delay to stv0299 pll gate control to fix tuning problems. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/bsbe1.h2
-rw-r--r--drivers/media/dvb/frontends/bsru6.h2
-rw-r--r--drivers/media/dvb/frontends/lg_h06xf.h4
-rw-r--r--drivers/media/dvb/frontends/stv0299.c6
4 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/bsbe1.h b/drivers/media/dvb/frontends/bsbe1.h
index 6b52d5abf19f..b2aeddb14e16 100644
--- a/drivers/media/dvb/frontends/bsbe1.h
+++ b/drivers/media/dvb/frontends/bsbe1.h
@@ -106,6 +106,8 @@ static int alps_bsbe1_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
106 data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; 106 data[2] = 0x80 | ((div & 0x18000) >> 10) | 4;
107 data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; 107 data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4;
108 108
109 if (fe->ops->i2c_gate_ctrl)
110 fe->ops->i2c_gate_ctrl(fe, 1);
109 ret = i2c_transfer(i2c, &msg, 1); 111 ret = i2c_transfer(i2c, &msg, 1);
110 return (ret != 1) ? -EIO : 0; 112 return (ret != 1) ? -EIO : 0;
111} 113}
diff --git a/drivers/media/dvb/frontends/bsru6.h b/drivers/media/dvb/frontends/bsru6.h
index 5d13c5e4df64..5533512b04c6 100644
--- a/drivers/media/dvb/frontends/bsru6.h
+++ b/drivers/media/dvb/frontends/bsru6.h
@@ -120,6 +120,8 @@ static int alps_bsru6_tuner_set_params(struct dvb_frontend *fe, struct dvb_front
120 if (params->frequency > 1530000) 120 if (params->frequency > 1530000)
121 buf[3] = 0xc0; 121 buf[3] = 0xc0;
122 122
123 if (fe->ops->i2c_gate_ctrl)
124 fe->ops->i2c_gate_ctrl(fe, 1);
123 if (i2c_transfer(i2c, &msg, 1) != 1) 125 if (i2c_transfer(i2c, &msg, 1) != 1)
124 return -EIO; 126 return -EIO;
125 return 0; 127 return 0;
diff --git a/drivers/media/dvb/frontends/lg_h06xf.h b/drivers/media/dvb/frontends/lg_h06xf.h
index d8449f8cff71..c59fe4180522 100644
--- a/drivers/media/dvb/frontends/lg_h06xf.h
+++ b/drivers/media/dvb/frontends/lg_h06xf.h
@@ -29,6 +29,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada
29 int err; 29 int err;
30 30
31 dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0); 31 dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0);
32 if (fe->ops->i2c_gate_ctrl)
33 fe->ops->i2c_gate_ctrl(fe, 1);
32 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { 34 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) {
33 printk(KERN_WARNING "lg_h06xf: %s error " 35 printk(KERN_WARNING "lg_h06xf: %s error "
34 "(addr %02x <- %02x, err = %i)\n", 36 "(addr %02x <- %02x, err = %i)\n",
@@ -45,6 +47,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada
45 buf[0] |= 0x18; 47 buf[0] |= 0x18;
46 buf[1] = 0x50; 48 buf[1] = 0x50;
47 msg.len = 2; 49 msg.len = 2;
50 if (fe->ops->i2c_gate_ctrl)
51 fe->ops->i2c_gate_ctrl(fe, 1);
48 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { 52 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) {
49 printk(KERN_WARNING "lg_h06xf: %s error " 53 printk(KERN_WARNING "lg_h06xf: %s error "
50 "(addr %02x <- %02x, err = %i)\n", 54 "(addr %02x <- %02x, err = %i)\n",
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index 5a81310235a4..e91bb5842dc4 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -604,10 +604,12 @@ static int stv0299_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
604 struct stv0299_state* state = fe->demodulator_priv; 604 struct stv0299_state* state = fe->demodulator_priv;
605 605
606 if (enable) { 606 if (enable) {
607 return stv0299_writeregI(state, 0x05, 0xb5); 607 stv0299_writeregI(state, 0x05, 0xb5);
608 } else { 608 } else {
609 return stv0299_writeregI(state, 0x05, 0x35); 609 stv0299_writeregI(state, 0x05, 0x35);
610 } 610 }
611 udelay(1);
612 return 0;
611} 613}
612 614
613static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) 615static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)