diff options
Diffstat (limited to 'drivers/media/dvb/frontends/stv0297.c')
-rw-r--r-- | drivers/media/dvb/frontends/stv0297.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index eb15676d374f..c8c3b74f9958 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c | |||
@@ -276,12 +276,14 @@ static int stv0297_set_inversion(struct stv0297_state *state, fe_spectral_invers | |||
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
278 | 278 | ||
279 | int stv0297_enable_plli2c(struct dvb_frontend *fe) | 279 | static int stv0297_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) |
280 | { | 280 | { |
281 | struct stv0297_state *state = fe->demodulator_priv; | 281 | struct stv0297_state *state = fe->demodulator_priv; |
282 | 282 | ||
283 | stv0297_writereg(state, 0x87, 0x78); | 283 | if (enable) { |
284 | stv0297_writereg(state, 0x86, 0xc8); | 284 | stv0297_writereg(state, 0x87, 0x78); |
285 | stv0297_writereg(state, 0x86, 0xc8); | ||
286 | } | ||
285 | 287 | ||
286 | return 0; | 288 | return 0; |
287 | } | 289 | } |
@@ -296,9 +298,6 @@ static int stv0297_init(struct dvb_frontend *fe) | |||
296 | stv0297_writereg(state, state->config->inittab[i], state->config->inittab[i+1]); | 298 | stv0297_writereg(state, state->config->inittab[i], state->config->inittab[i+1]); |
297 | msleep(200); | 299 | msleep(200); |
298 | 300 | ||
299 | if (state->config->pll_init) | ||
300 | state->config->pll_init(fe); | ||
301 | |||
302 | return 0; | 301 | return 0; |
303 | } | 302 | } |
304 | 303 | ||
@@ -421,7 +420,10 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par | |||
421 | } | 420 | } |
422 | 421 | ||
423 | stv0297_init(fe); | 422 | stv0297_init(fe); |
424 | state->config->pll_set(fe, p); | 423 | if (fe->ops->tuner_ops.set_params) { |
424 | fe->ops->tuner_ops.set_params(fe, p); | ||
425 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | ||
426 | } | ||
425 | 427 | ||
426 | /* clear software interrupts */ | 428 | /* clear software interrupts */ |
427 | stv0297_writereg(state, 0x82, 0x0); | 429 | stv0297_writereg(state, 0x82, 0x0); |
@@ -668,6 +670,7 @@ static struct dvb_frontend_ops stv0297_ops = { | |||
668 | 670 | ||
669 | .init = stv0297_init, | 671 | .init = stv0297_init, |
670 | .sleep = stv0297_sleep, | 672 | .sleep = stv0297_sleep, |
673 | .i2c_gate_ctrl = stv0297_i2c_gate_ctrl, | ||
671 | 674 | ||
672 | .set_frontend = stv0297_set_frontend, | 675 | .set_frontend = stv0297_set_frontend, |
673 | .get_frontend = stv0297_get_frontend, | 676 | .get_frontend = stv0297_get_frontend, |
@@ -684,4 +687,3 @@ MODULE_AUTHOR("Dennis Noermann and Andrew de Quincey"); | |||
684 | MODULE_LICENSE("GPL"); | 687 | MODULE_LICENSE("GPL"); |
685 | 688 | ||
686 | EXPORT_SYMBOL(stv0297_attach); | 689 | EXPORT_SYMBOL(stv0297_attach); |
687 | EXPORT_SYMBOL(stv0297_enable_plli2c); | ||