summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorChris Pascoe <c.pascoe@itee.uq.edu.au>2007-02-10 11:19:08 -0200
committerChris Pascoe <c.pascoe@itee.uq.edu.au>2007-02-10 11:19:08 -0200
commitfa24f03ffa4270665b8176fa306b84962cc78b74 (patch)
tree3be6aa1922ce31b2138f7ddd8b88ed05ad2a3721 /linux/drivers/media
parent637cf08abf2ad06f3fde39c829238ffafe036151 (diff)
downloadmediapointer-dvb-s2-fa24f03ffa4270665b8176fa306b84962cc78b74.tar.gz
mediapointer-dvb-s2-fa24f03ffa4270665b8176fa306b84962cc78b74.tar.bz2
zl10353: add i2c_gate_ctrl support
From: Antti Palosaari <crope@iki.fi> Implement I2C gate control for Megasky GL861 and SigmaTek AU6610 support. Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au> Signed-off-by: Antti Palosaari <crope@iki.fi>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/frontends/zl10353.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/frontends/zl10353.c b/linux/drivers/media/dvb/frontends/zl10353.c
index d7e3d807f..ac6b13e47 100644
--- a/linux/drivers/media/dvb/frontends/zl10353.c
+++ b/linux/drivers/media/dvb/frontends/zl10353.c
@@ -146,14 +146,16 @@ static int zl10353_set_parameters(struct dvb_frontend *fe,
zl10353_single_write(fe, 0x66, 0xE9);
zl10353_single_write(fe, 0x6C, 0xCD);
zl10353_single_write(fe, 0x6D, 0x7E);
- zl10353_single_write(fe, 0x62, 0x0A);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
// if there is no attached secondary tuner, we call set_params to program
// a potential tuner attached somewhere else
if (state->config.no_tuner) {
if (fe->ops.tuner_ops.set_params) {
fe->ops.tuner_ops.set_params(fe, param);
- if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 0);
}
}
@@ -304,6 +306,16 @@ static int zl10353_init(struct dvb_frontend *fe)
return 0;
}
+static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
+{
+ u8 val = 0x0a;
+
+ if (enable)
+ val |= 0x10;
+
+ return zl10353_single_write(fe, 0x62, val);
+}
+
static void zl10353_release(struct dvb_frontend *fe)
{
struct zl10353_state *state = fe->demodulator_priv;
@@ -362,6 +374,7 @@ static struct dvb_frontend_ops zl10353_ops = {
.init = zl10353_init,
.sleep = zl10353_sleep,
+ .i2c_gate_ctrl = zl10353_i2c_gate_ctrl,
.write = zl10353_write,
.set_frontend = zl10353_set_parameters,