提交 261143ff 编写于 作者: A Andrew de Quincey 提交者: Mauro Carvalho Chehab

V4L/DVB (3870): Convert dib3000* to refactored tuner code

Convert to tuner_ops calls.
Remove pll function pointers from structure.
Remove unneeded tuner calls.
Signed-off-by: NAndrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 20b14562
...@@ -30,10 +30,6 @@ struct dib3000_config ...@@ -30,10 +30,6 @@ struct dib3000_config
{ {
/* the demodulator's i2c address */ /* the demodulator's i2c address */
u8 demod_address; u8 demod_address;
/* PLL maintenance and the i2c address of the PLL */
int (*pll_init)(struct dvb_frontend *fe);
int (*pll_set)(struct dvb_frontend *fe, struct dvb_frontend_parameters* params);
}; };
struct dib_fe_xfer_ops struct dib_fe_xfer_ops
......
...@@ -60,8 +60,9 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, ...@@ -60,8 +60,9 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe,
fe_code_rate_t fe_cr = FEC_NONE; fe_code_rate_t fe_cr = FEC_NONE;
int search_state, seq; int search_state, seq;
if (tuner && state->config.pll_set) { if (tuner && fe->ops->tuner_ops.set_params) {
state->config.pll_set(fe, fep); fe->ops->tuner_ops.set_params(fe, fep);
if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0);
deb_setf("bandwidth: "); deb_setf("bandwidth: ");
switch (ofdm->bandwidth) { switch (ofdm->bandwidth) {
...@@ -386,9 +387,6 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) ...@@ -386,9 +387,6 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode)
wr(DIB3000MB_REG_DATA_IN_DIVERSITY, DIB3000MB_DATA_DIVERSITY_IN_OFF); wr(DIB3000MB_REG_DATA_IN_DIVERSITY, DIB3000MB_DATA_DIVERSITY_IN_OFF);
if (state->config.pll_init)
state->config.pll_init(fe);
return 0; return 0;
} }
......
...@@ -462,8 +462,9 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe, ...@@ -462,8 +462,9 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
int search_state,auto_val; int search_state,auto_val;
u16 val; u16 val;
if (tuner && state->config.pll_set) { /* initial call from dvb */ if (tuner && fe->ops->tuner_ops.set_params) { /* initial call from dvb */
state->config.pll_set(fe,fep); fe->ops->tuner_ops.set_params(fe, fep);
if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0);
state->last_tuned_freq = fep->frequency; state->last_tuned_freq = fep->frequency;
// if (!scanboost) { // if (!scanboost) {
...@@ -642,9 +643,6 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode) ...@@ -642,9 +643,6 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF); set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF);
if (state->config.pll_init)
state->config.pll_init(fe);
deb_info("init end\n"); deb_info("init end\n");
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册