Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192780
b: refs/heads/master
c: c5b74b0
h: refs/heads/master
v: v3
  • Loading branch information
Manu Abraham authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 0d1068f commit 42b59db
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 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: 19c4ee58325ac7c9d9595153fabb5d885dfe931e
refs/heads/master: c5b74b0f5e81386ca1e9b1128de83502e92fa028
8 changes: 8 additions & 0 deletions trunk/drivers/media/dvb/frontends/stv090x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3838,6 +3838,11 @@ static int stv090x_sleep(struct dvb_frontend *fe)
struct stv090x_state *state = fe->demodulator_priv;
u32 reg;

if (state->config->tuner_init) {
if (state->config->tuner_sleep(fe) < 0)
goto err_gateoff;
}

dprintk(FE_DEBUG, 1, "Set %s to sleep",
state->device == STV0900 ? "STV0900" : "STV0903");

Expand All @@ -3852,6 +3857,9 @@ static int stv090x_sleep(struct dvb_frontend *fe)
goto err;

return 0;

err_gateoff:
stv090x_i2c_gate_ctrl(state, 0);
err:
dprintk(FE_ERROR, 1, "I/O error");
return -1;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/frontends/stv090x.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ struct stv090x_config {
bool diseqc_envelope_mode;

int (*tuner_init) (struct dvb_frontend *fe);
int (*tuner_sleep) (struct dvb_frontend *fe);
int (*tuner_set_mode) (struct dvb_frontend *fe, enum tuner_mode mode);
int (*tuner_set_frequency) (struct dvb_frontend *fe, u32 frequency);
int (*tuner_get_frequency) (struct dvb_frontend *fe, u32 *frequency);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/media/dvb/frontends/stv6110x.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,12 @@ static struct dvb_tuner_ops stv6110x_ops = {
.frequency_max = 2150000,
.frequency_step = 0,
},

.init = stv6110x_init,
.sleep = stv6110x_sleep,
.release = stv6110x_release
};

static struct stv6110x_devctl stv6110x_ctl = {
.tuner_init = stv6110x_init,
.tuner_sleep = stv6110x_sleep,
.tuner_set_mode = stv6110x_set_mode,
.tuner_set_frequency = stv6110x_set_frequency,
.tuner_get_frequency = stv6110x_get_frequency,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/frontends/stv6110x.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ enum tuner_status {

struct stv6110x_devctl {
int (*tuner_init) (struct dvb_frontend *fe);
int (*tuner_sleep) (struct dvb_frontend *fe);
int (*tuner_set_mode) (struct dvb_frontend *fe, enum tuner_mode mode);
int (*tuner_set_frequency) (struct dvb_frontend *fe, u32 frequency);
int (*tuner_get_frequency) (struct dvb_frontend *fe, u32 *frequency);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/dvb/ttpci/budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ static struct stv090x_config tt1600_stv090x_config = {
.repeater_level = STV090x_RPTLEVEL_16,

.tuner_init = NULL,
.tuner_sleep = NULL,
.tuner_set_mode = NULL,
.tuner_set_frequency = NULL,
.tuner_get_frequency = NULL,
Expand Down Expand Up @@ -628,6 +629,7 @@ static void frontend_init(struct budget *budget)
&budget->i2c_adap);

tt1600_stv090x_config.tuner_init = ctl->tuner_init;
tt1600_stv090x_config.tuner_sleep = ctl->tuner_sleep;
tt1600_stv090x_config.tuner_set_mode = ctl->tuner_set_mode;
tt1600_stv090x_config.tuner_set_frequency = ctl->tuner_set_frequency;
tt1600_stv090x_config.tuner_get_frequency = ctl->tuner_get_frequency;
Expand Down

0 comments on commit 42b59db

Please sign in to comment.