From: Stefan Ringel <linu...@stefanringel.de>

Signed-off-by: Stefan Ringel <linu...@stefanringel.de>
---
 drivers/media/common/tuners/mt2063.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/mt2063.c 
b/drivers/media/common/tuners/mt2063.c
index 3af5242..0e26744 100644
--- a/drivers/media/common/tuners/mt2063.c
+++ b/drivers/media/common/tuners/mt2063.c
@@ -460,13 +460,25 @@ static int mt2063_init(struct dvb_frontend *fe)
        return 0;
 }
 
+static int mt2063_sleep(struct dvb_frontend *fe)
 {
        struct mt2063_state *state = fe->tuner_priv;
 
+       dprintk(1, "\n");
+       mutex_lock(&state->lock);
 
+       /* open gate */
+       if (fe->ops.i2c_gate_ctrl)
+               fe->ops.i2c_gate_ctrl(fe, 1);
 
+       /* set all power bits off */
+       mt2063_shutdown(state, MT2063_ALL_SD);
 
+       /* close gate */
+       if (fe->ops.i2c_gate_ctrl)
+               fe->ops.i2c_gate_ctrl(fe, 0);
 
+       mutex_unlock(&state->lock);
        return 0;
 }
 
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to