summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/at76c651.c
diff options
context:
space:
mode:
authorrmcc@localhost.localdomain <rmcc@localhost.localdomain>2006-05-18 16:06:06 +0100
committerrmcc@localhost.localdomain <rmcc@localhost.localdomain>2006-05-18 16:06:06 +0100
commitaad2e973e44590acd4c1b55dd32eadad842e7fdb (patch)
treede152190bd763eb849cf2952cfb468169f3881ba /linux/drivers/media/dvb/frontends/at76c651.c
parentf637ab4e875bd28b68bbd4d776c2071683050b5c (diff)
parent122bd90fa6f72e1366146662e7fb9a6581aab68e (diff)
downloadmediapointer-dvb-s2-aad2e973e44590acd4c1b55dd32eadad842e7fdb.tar.gz
mediapointer-dvb-s2-aad2e973e44590acd4c1b55dd32eadad842e7fdb.tar.bz2
merge: from master
From: Ricardo Cerqueira <v4l@cerqueira.org> merging master changes Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/at76c651.c')
-rw-r--r--linux/drivers/media/dvb/frontends/at76c651.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/frontends/at76c651.c b/linux/drivers/media/dvb/frontends/at76c651.c
index ddcb99cc5..556689a80 100644
--- a/linux/drivers/media/dvb/frontends/at76c651.c
+++ b/linux/drivers/media/dvb/frontends/at76c651.c
@@ -246,9 +246,10 @@ static int at76c651_set_parameters(struct dvb_frontend* fe,
int ret;
struct at76c651_state* state = fe->demodulator_priv;
- at76c651_writereg(state, 0x0c, 0xc3);
- state->config->pll_set(fe, p);
- at76c651_writereg(state, 0x0c, 0xc2);
+ if (fe->ops->tuner_ops.set_params) {
+ fe->ops->tuner_ops.set_params(fe, p);
+ if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0);
+ }
if ((ret = at76c651_set_symbol_rate(state, p->u.qam.symbol_rate)))
return ret;
@@ -268,12 +269,6 @@ static int at76c651_set_defaults(struct dvb_frontend* fe)
at76c651_set_bbfreq(state);
at76c651_set_auto_config(state);
- if (state->config->pll_init) {
- at76c651_writereg(state, 0x0c, 0xc3);
- state->config->pll_init(fe);
- at76c651_writereg(state, 0x0c, 0xc2);
- }
-
return 0;
}
@@ -344,6 +339,17 @@ static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
return 0;
}
+static int at76c651_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
+{
+ struct at76c651_state* state = fe->demodulator_priv;
+
+ if (enable) {
+ return at76c651_writereg(state, 0x0c, 0xc3);
+ } else {
+ return at76c651_writereg(state, 0x0c, 0xc2);
+ }
+}
+
static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *fesettings)
{
fesettings->min_delay_ms = 50;
@@ -414,6 +420,7 @@ static struct dvb_frontend_ops at76c651_ops = {
.release = at76c651_release,
.init = at76c651_set_defaults,
+ .i2c_gate_ctrl = at76c651_i2c_gate_ctrl,
.set_frontend = at76c651_set_parameters,
.get_tune_settings = at76c651_get_tune_settings,