Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106771
b: refs/heads/master
c: 452a53a
h: refs/heads/master
i:
  106769: 06fff1c
  106767: da5e462
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jul 27, 2008
1 parent ce8f5fb commit 0c7a3b9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 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: 2a83e4d5e40fd8eda3c04a5847f0876a4be9d45b
refs/heads/master: 452a53a247d9181bb0ec07ce1def51769619e9d2
42 changes: 34 additions & 8 deletions trunk/drivers/media/common/tuners/mxl5007t.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,27 +830,53 @@ static int mxl5007t_set_analog_params(struct dvb_frontend *fe,
static int mxl5007t_init(struct dvb_frontend *fe)
{
struct mxl5007t_state *state = fe->tuner_priv;
//int ret;
int ret;
u8 d;

mutex_lock(&state->lock);
/* do init */
//fail:

if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);

ret = mxl5007t_read_reg(state, 0x05, &d);
if (mxl_fail(ret))
goto fail;

ret = mxl5007t_write_reg(state, 0x05, d | 0x01);
mxl_fail(ret);
fail:
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);

mutex_unlock(&state->lock);

return 0;//ret;
return ret;
}

static int mxl5007t_sleep(struct dvb_frontend *fe)
{
struct mxl5007t_state *state = fe->tuner_priv;
//int ret;
int ret;
u8 d;

mutex_lock(&state->lock);
/* do standby */
//fail:

if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);

ret = mxl5007t_read_reg(state, 0x05, &d);
if (mxl_fail(ret))
goto fail;

ret = mxl5007t_write_reg(state, 0x05, d & ~0x01);
mxl_fail(ret);
fail:
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);

mutex_unlock(&state->lock);

return 0;//ret;
return ret;
}

/* ------------------------------------------------------------------------- */
Expand Down

0 comments on commit 0c7a3b9

Please sign in to comment.