diff options
author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-11-19 11:41:20 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 19:02:31 -0200 |
commit | 45819c381fc4fb342dc091f30eef4b56193e34d5 (patch) | |
tree | c5d2604fd86899672fa8fad4488ff4a725ac5315 /drivers/media/video/tuner-xc2028.c | |
parent | 8bf799a6217f6336fb95f37bf1b130003404bd7b (diff) | |
download | lwn-45819c381fc4fb342dc091f30eef4b56193e34d5.tar.gz lwn-45819c381fc4fb342dc091f30eef4b56193e34d5.zip |
V4L/DVB (6648): xc2028: add sleep hook
Add sleep method to enable putting the tuner into standby mode.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-xc2028.c')
-rw-r--r-- | drivers/media/video/tuner-xc2028.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index cc6fa2fa859b..8f9ccaee9bb5 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c @@ -929,6 +929,28 @@ static int xc2028_set_params(struct dvb_frontend *fe, } +static int xc2028_sleep(struct dvb_frontend *fe) +{ + struct xc2028_data *priv = fe->tuner_priv; + int rc = 0; + + tuner_dbg("%s called\n", __FUNCTION__); + + mutex_lock(&priv->lock); + + if (priv->firm_version < 0x0202) + rc = send_seq(priv, {0x00, 0x08, 0x00, 0x00}); + else + rc = send_seq(priv, {0x80, 0x08, 0x00, 0x00}); + + priv->cur_fw.type = 0; /* need firmware reload */ + + mutex_unlock(&priv->lock); + + return rc; +} + + static int xc2028_dvb_release(struct dvb_frontend *fe) { struct xc2028_data *priv = fe->tuner_priv; @@ -1009,6 +1031,7 @@ static const struct dvb_tuner_ops xc2028_dvb_tuner_ops = { .get_frequency = xc2028_get_frequency, .get_rf_strength = xc2028_signal, .set_params = xc2028_set_params, + .sleep = xc2028_sleep, }; |