diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-11 17:08:23 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-11 17:08:23 -0200 |
commit | fe13e147a7c65a93afe394f14e57b3315fc0697c (patch) | |
tree | 75842c81a12af555b3e1dc2c609d359ddb2c3850 /linux/drivers/media/dvb/frontends | |
parent | ab9c2ae1b64368ffbe815708ec1a0e76aea5904d (diff) | |
parent | 9419425f19b35bd57aa09dd9365786a03480b24b (diff) | |
download | mediapointer-dvb-s2-fe13e147a7c65a93afe394f14e57b3315fc0697c.tar.gz mediapointer-dvb-s2-fe13e147a7c65a93afe394f14e57b3315fc0697c.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/megasky.dev
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r-- | linux/drivers/media/dvb/frontends/qt1010.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/qt1010.c b/linux/drivers/media/dvb/frontends/qt1010.c index 60931f83f..db93776ce 100644 --- a/linux/drivers/media/dvb/frontends/qt1010.c +++ b/linux/drivers/media/dvb/frontends/qt1010.c @@ -149,6 +149,9 @@ static int qt1010_set_params(struct dvb_frontend *fe, struct dvb_frontend_parame priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; priv->frequency = freq; + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ + /* reg 05 base value */ if (freq < 290000000) reg05 = 0x14; /* 290 MHz */ else if (freq < 610000000) reg05 = 0x34; /* 610 MHz */ @@ -242,6 +245,9 @@ static int qt1010_set_params(struct dvb_frontend *fe, struct dvb_frontend_parame if (debug) qt1010_dump_regs(priv); + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ + return 0; } @@ -277,7 +283,6 @@ static int qt1010_init_meas1(struct qt1010_priv *priv, u8 oper, u8 reg, u8 reg_i return qt1010_writereg(priv, 0x1e, 0x00); } - static u8 qt1010_init_meas2(struct qt1010_priv *priv, u8 reg_init_val, u8 *retval) { u8 i, val; @@ -347,6 +352,9 @@ static int qt1010_init(struct dvb_frontend *fe) { QT1010_WR, 0x08, 0x08 } }; + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ + for (i = 0; i < sizeof(i2c_data) / sizeof(*i2c_data); i++) { switch (i2c_data[i].oper) { case QT1010_WR: @@ -430,6 +438,9 @@ struct dvb_frontend * qt1010_attach(struct dvb_frontend *fe, priv->cfg = cfg; priv->i2c = i2c; + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 1); /* open i2c_gate */ + #if 0 qt1010_dump_regs(priv); #endif @@ -440,6 +451,9 @@ struct dvb_frontend * qt1010_attach(struct dvb_frontend *fe, return NULL; } + if (fe->ops.i2c_gate_ctrl) + fe->ops.i2c_gate_ctrl(fe, 0); /* close i2c_gate */ + printk(KERN_INFO "Quantek QT1010 successfully identified.\n"); memcpy(&fe->ops.tuner_ops, &qt1010_tuner_ops, sizeof(struct dvb_tuner_ops)); |