diff options
author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-11-20 00:41:20 +1000 |
---|---|---|
committer | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-11-20 00:41:20 +1000 |
commit | 94aad442d566ae9023c273dceb3abe7c7a709c01 (patch) | |
tree | 7d19d171e07118b26332dd1a04c1cf473b37f054 /linux/drivers/media | |
parent | 2c98c111d17c248cec0002a32688fa71f28c4bc7 (diff) | |
download | mediapointer-dvb-s2-94aad442d566ae9023c273dceb3abe7c7a709c01.tar.gz mediapointer-dvb-s2-94aad442d566ae9023c273dceb3abe7c7a709c01.tar.bz2 |
xc2028: add sleep hook
From: Chris Pascoe <c.pascoe@itee.uq.edu.au>
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 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/tuner-xc2028.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c index 71cc565fb..ca61c25a7 100644 --- a/linux/drivers/media/video/tuner-xc2028.c +++ b/linux/drivers/media/video/tuner-xc2028.c @@ -944,6 +944,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; @@ -1024,9 +1046,9 @@ 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, #if 0 - int (*sleep)(struct dvb_frontend *fe); int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth); int (*get_status)(struct dvb_frontend *fe, u32 *status); #endif |