diff options
author | Mike Isely <isely@pobox.com> | 2006-04-25 19:26:46 -0500 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2006-04-25 19:26:46 -0500 |
commit | e362706b3e90987c5ca839def8372bff58fea7c0 (patch) | |
tree | 2c94262c383b9f881b278b9bfe0499231a7458ef /linux/drivers/media/dvb/frontends/sp8870.c | |
parent | 60f073ffa46dc14bcbc82b9c14ff5fb6cc2a5102 (diff) | |
parent | 682261e2c90d58868dd27ef1c524e327074a637d (diff) | |
download | mediapointer-dvb-s2-e362706b3e90987c5ca839def8372bff58fea7c0.tar.gz mediapointer-dvb-s2-e362706b3e90987c5ca839def8372bff58fea7c0.tar.bz2 |
Merge from master
From: Mike Isely <isely@pobox.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/sp8870.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/sp8870.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/frontends/sp8870.c b/linux/drivers/media/dvb/frontends/sp8870.c index 73829e647..4d553c0da 100644 --- a/linux/drivers/media/dvb/frontends/sp8870.c +++ b/linux/drivers/media/dvb/frontends/sp8870.c @@ -262,9 +262,10 @@ static int sp8870_set_frontend_parameters (struct dvb_frontend* fe, sp8870_microcontroller_stop(state); // set tuner parameters - sp8870_writereg(state, 0x206, 0x001); - state->config->pll_set(fe, p); - sp8870_writereg(state, 0x206, 0x000); + 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); + } // sample rate correction bit [23..17] sp8870_writereg(state, 0x0319, 0x000A); @@ -349,13 +350,6 @@ static int sp8870_init (struct dvb_frontend* fe) sp8870_writereg(state, 0x0D00, 0x010); sp8870_writereg(state, 0x0D01, 0x000); - /* setup PLL */ - if (state->config->pll_init) { - sp8870_writereg(state, 0x206, 0x001); - state->config->pll_init(fe); - sp8870_writereg(state, 0x206, 0x000); - } - return 0; } @@ -541,6 +535,17 @@ static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend return 0; } +static int sp8870_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) +{ + struct sp8870_state* state = fe->demodulator_priv; + + if (enable) { + return sp8870_writereg(state, 0x206, 0x001); + } else { + return sp8870_writereg(state, 0x206, 0x000); + } +} + static void sp8870_release(struct dvb_frontend* fe) { struct sp8870_state* state = fe->demodulator_priv; @@ -597,6 +602,7 @@ static struct dvb_frontend_ops sp8870_ops = { .init = sp8870_init, .sleep = sp8870_sleep, + .i2c_gate_ctrl = sp8870_i2c_gate_ctrl, .set_frontend = sp8870_set_frontend, .get_tune_settings = sp8870_get_tune_settings, |