summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-16 03:44:52 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-16 03:44:52 +0000
commit5f74e4c2e62639cfefc8edb708879cb187e6d8b5 (patch)
treeb9224a517f8989f3946d4b5e8368182b0e8a03cc
parent3d34dfb02c8a0f924d78122ea83aa239a1063151 (diff)
downloadmediapointer-dvb-s2-5f74e4c2e62639cfefc8edb708879cb187e6d8b5.tar.gz
mediapointer-dvb-s2-5f74e4c2e62639cfefc8edb708879cb187e6d8b5.tar.bz2
Make sure the i2c gate is open before powering down tuner
From: Devin Heitmueller <devin.heitmueller@gmail.com> It is not safe to assume that the i2c gate will be open before issuing the command to power down the tuner. In fact, many demods only open the gate long enough to issue the tuning command. This fix allows power management to work properly for those tuners behind an i2c gate (in my case the problem was with the HVR-950Q) Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 3082ceb8b..e7adf9f47 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -656,6 +656,8 @@ restart:
if (fe->ops.set_voltage)
fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF);
if (fe->ops.tuner_ops.sleep) {
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
fe->ops.tuner_ops.sleep(fe);
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);