diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-03 05:27:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 08:16:28 -0200 |
commit | 68541cdaadecbc280cd50122f11fdbb249a2ae29 (patch) | |
tree | c82b6c50215e59559ed8d0daf454b8f68e46b7d1 /drivers/media/dvb/frontends/mb86a20s.c | |
parent | 7572f9c5575c721f43b575a71fda1ecd896e0327 (diff) |
[media] Add support for Kworld SBTVD board
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/mb86a20s.c')
-rw-r--r-- | drivers/media/dvb/frontends/mb86a20s.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/mb86a20s.c b/drivers/media/dvb/frontends/mb86a20s.c index b4de8f12df2..d3ad3e75a35 100644 --- a/drivers/media/dvb/frontends/mb86a20s.c +++ b/drivers/media/dvb/frontends/mb86a20s.c @@ -376,6 +376,9 @@ static int mb86a20s_initfe(struct dvb_frontend *fe) dprintk("\n"); + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); + /* Initialize the frontend */ rc = mb86a20s_writeregdata(state, mb86a20s_init); if (rc < 0) @@ -392,6 +395,9 @@ static int mb86a20s_initfe(struct dvb_frontend *fe) return rc; } + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); + return 0; } @@ -403,6 +409,9 @@ static int mb86a20s_read_signal_strength(struct dvb_frontend *fe, u16 *strength) dprintk("\n"); + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); + /* Does a binary search to get RF strength */ rf_max = 0xfff; rf_min = 0; @@ -426,6 +435,9 @@ static int mb86a20s_read_signal_strength(struct dvb_frontend *fe, u16 *strength) dprintk("signal strength = %d\n", *strength); + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); + return 0; } @@ -437,7 +449,11 @@ static int mb86a20s_read_status(struct dvb_frontend *fe, fe_status_t *status) dprintk("\n"); *status = 0; + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); val = mb86a20s_readreg(state, 0x0a) & 0xf; + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); if (val >= 2) *status |= FE_HAS_SIGNAL; @@ -467,8 +483,15 @@ static int mb86a20s_set_frontend(struct dvb_frontend *fe, dprintk("\n"); + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.tuner_ops.set_params(fe, p); + + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); rc = mb86a20s_writeregdata(state, mb86a20s_reset_reception); + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); return rc; } |