diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.c | 24 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.h | 7 |
2 files changed, 4 insertions, 27 deletions
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index 0fc899f81c5e..a129fc9cba30 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c | |||
@@ -211,22 +211,10 @@ static int cx22702_set_tps (struct dvb_frontend* fe, struct dvb_frontend_paramet | |||
211 | u8 val; | 211 | u8 val; |
212 | struct cx22702_state* state = fe->demodulator_priv; | 212 | struct cx22702_state* state = fe->demodulator_priv; |
213 | 213 | ||
214 | /* set PLL */ | 214 | if (fe->ops->tuner_ops.set_params) { |
215 | cx22702_i2c_gate_ctrl(fe, 1); | 215 | fe->ops->tuner_ops.set_params(fe, p); |
216 | if (state->config->pll_set) { | 216 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); |
217 | state->config->pll_set(fe, p); | ||
218 | } else if (state->config->pll_desc) { | ||
219 | u8 pllbuf[4]; | ||
220 | struct i2c_msg msg = { .addr = state->config->pll_address, | ||
221 | .buf = pllbuf, .len = 4 }; | ||
222 | dvb_pll_configure(state->config->pll_desc, pllbuf, | ||
223 | p->frequency, | ||
224 | p->u.ofdm.bandwidth); | ||
225 | i2c_transfer(state->i2c, &msg, 1); | ||
226 | } else { | ||
227 | BUG(); | ||
228 | } | 217 | } |
229 | cx22702_i2c_gate_ctrl(fe, 0); | ||
230 | 218 | ||
231 | /* set inversion */ | 219 | /* set inversion */ |
232 | cx22702_set_inversion (state, p->inversion); | 220 | cx22702_set_inversion (state, p->inversion); |
@@ -358,10 +346,6 @@ static int cx22702_init (struct dvb_frontend* fe) | |||
358 | 346 | ||
359 | cx22702_writereg (state, 0xf8, (state->config->output_mode << 1) & 0x02); | 347 | cx22702_writereg (state, 0xf8, (state->config->output_mode << 1) & 0x02); |
360 | 348 | ||
361 | /* init PLL */ | ||
362 | if (state->config->pll_init) | ||
363 | state->config->pll_init(fe); | ||
364 | |||
365 | cx22702_i2c_gate_ctrl(fe, 0); | 349 | cx22702_i2c_gate_ctrl(fe, 0); |
366 | 350 | ||
367 | return 0; | 351 | return 0; |
@@ -530,6 +514,7 @@ static struct dvb_frontend_ops cx22702_ops = { | |||
530 | .release = cx22702_release, | 514 | .release = cx22702_release, |
531 | 515 | ||
532 | .init = cx22702_init, | 516 | .init = cx22702_init, |
517 | .i2c_gate_ctrl = cx22702_i2c_gate_ctrl, | ||
533 | 518 | ||
534 | .set_frontend = cx22702_set_tps, | 519 | .set_frontend = cx22702_set_tps, |
535 | .get_frontend = cx22702_get_frontend, | 520 | .get_frontend = cx22702_get_frontend, |
@@ -540,7 +525,6 @@ static struct dvb_frontend_ops cx22702_ops = { | |||
540 | .read_signal_strength = cx22702_read_signal_strength, | 525 | .read_signal_strength = cx22702_read_signal_strength, |
541 | .read_snr = cx22702_read_snr, | 526 | .read_snr = cx22702_read_snr, |
542 | .read_ucblocks = cx22702_read_ucblocks, | 527 | .read_ucblocks = cx22702_read_ucblocks, |
543 | .i2c_gate_ctrl = cx22702_i2c_gate_ctrl, | ||
544 | }; | 528 | }; |
545 | 529 | ||
546 | module_param(debug, int, 0644); | 530 | module_param(debug, int, 0644); |
diff --git a/drivers/media/dvb/frontends/cx22702.h b/drivers/media/dvb/frontends/cx22702.h index 5633976a58f1..7f2f241e5d44 100644 --- a/drivers/media/dvb/frontends/cx22702.h +++ b/drivers/media/dvb/frontends/cx22702.h | |||
@@ -39,13 +39,6 @@ struct cx22702_config | |||
39 | #define CX22702_PARALLEL_OUTPUT 0 | 39 | #define CX22702_PARALLEL_OUTPUT 0 |
40 | #define CX22702_SERIAL_OUTPUT 1 | 40 | #define CX22702_SERIAL_OUTPUT 1 |
41 | u8 output_mode; | 41 | u8 output_mode; |
42 | |||
43 | /* PLL maintenance */ | ||
44 | u8 pll_address; | ||
45 | struct dvb_pll_desc *pll_desc; | ||
46 | |||
47 | int (*pll_init)(struct dvb_frontend* fe); | ||
48 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); | ||
49 | }; | 42 | }; |
50 | 43 | ||
51 | extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, | 44 | extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, |