Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29882
b: refs/heads/master
c: 58ac7d3
h: refs/heads/master
v: v3
  • Loading branch information
Andrew de Quincey authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent cabf211 commit e4ca855
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a81870e00bf502db2c579dcb9721adab3775ba58
refs/heads/master: 58ac7d36179e27d82e067752b792b1cc573fc590
18 changes: 10 additions & 8 deletions trunk/drivers/media/dvb/frontends/stv0297.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,14 @@ static int stv0297_set_inversion(struct stv0297_state *state, fe_spectral_invers
return 0;
}

int stv0297_enable_plli2c(struct dvb_frontend *fe)
static int stv0297_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct stv0297_state *state = fe->demodulator_priv;

stv0297_writereg(state, 0x87, 0x78);
stv0297_writereg(state, 0x86, 0xc8);
if (enable) {
stv0297_writereg(state, 0x87, 0x78);
stv0297_writereg(state, 0x86, 0xc8);
}

return 0;
}
Expand All @@ -296,9 +298,6 @@ static int stv0297_init(struct dvb_frontend *fe)
stv0297_writereg(state, state->config->inittab[i], state->config->inittab[i+1]);
msleep(200);

if (state->config->pll_init)
state->config->pll_init(fe);

return 0;
}

Expand Down Expand Up @@ -421,7 +420,10 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
}

stv0297_init(fe);
state->config->pll_set(fe, p);
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);
}

/* clear software interrupts */
stv0297_writereg(state, 0x82, 0x0);
Expand Down Expand Up @@ -668,6 +670,7 @@ static struct dvb_frontend_ops stv0297_ops = {

.init = stv0297_init,
.sleep = stv0297_sleep,
.i2c_gate_ctrl = stv0297_i2c_gate_ctrl,

.set_frontend = stv0297_set_frontend,
.get_frontend = stv0297_get_frontend,
Expand All @@ -684,4 +687,3 @@ MODULE_AUTHOR("Dennis Noermann and Andrew de Quincey");
MODULE_LICENSE("GPL");

EXPORT_SYMBOL(stv0297_attach);
EXPORT_SYMBOL(stv0297_enable_plli2c);
5 changes: 0 additions & 5 deletions trunk/drivers/media/dvb/frontends/stv0297.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,9 @@ struct stv0297_config

/* does the "inversion" need inverted? */
u8 invert:1;

/* PLL maintenance */
int (*pll_init)(struct dvb_frontend* fe);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};

extern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config,
struct i2c_adapter* i2c);
extern int stv0297_enable_plli2c(struct dvb_frontend* fe);

#endif // STV0297_H

0 comments on commit e4ca855

Please sign in to comment.