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/cx22700.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/cx22700.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/cx22700.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/frontends/cx22700.c b/linux/drivers/media/dvb/frontends/cx22700.c index 755f774f6..02fee9047 100644 --- a/linux/drivers/media/dvb/frontends/cx22700.c +++ b/linux/drivers/media/dvb/frontends/cx22700.c @@ -247,12 +247,6 @@ static int cx22700_init (struct dvb_frontend* fe) cx22700_writereg (state, 0x00, 0x01); - if (state->config->pll_init) { - cx22700_writereg (state, 0x0a, 0x00); /* open i2c bus switch */ - state->config->pll_init(fe); - cx22700_writereg (state, 0x0a, 0x01); /* close i2c bus switch */ - } - return 0; } @@ -333,9 +327,11 @@ static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ cx22700_writereg (state, 0x00, 0x00); - cx22700_writereg (state, 0x0a, 0x00); /* open i2c bus switch */ - state->config->pll_set(fe, p); - cx22700_writereg (state, 0x0a, 0x01); /* close i2c bus switch */ + 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); + } + cx22700_set_inversion (state, p->inversion); cx22700_set_tps (state, &p->u.ofdm); cx22700_writereg (state, 0x37, 0x01); /* PAL loop filter off */ @@ -353,6 +349,17 @@ static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par return cx22700_get_tps (state, &p->u.ofdm); } +static int cx22700_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) +{ + struct cx22700_state* state = fe->demodulator_priv; + + if (enable) { + return cx22700_writereg(state, 0x0a, 0x00); + } else { + return cx22700_writereg(state, 0x0a, 0x01); + } +} + static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) { fesettings->min_delay_ms = 150; @@ -413,6 +420,7 @@ static struct dvb_frontend_ops cx22700_ops = { .release = cx22700_release, .init = cx22700_init, + .i2c_gate_ctrl = cx22700_i2c_gate_ctrl, .set_frontend = cx22700_set_frontend, .get_frontend = cx22700_get_frontend, |