summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/tda18271-fe.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2008-05-11 17:46:52 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 05:13:39 +0200
commit81259f210ef09c6e6e643c7cecc803a7083f970e (patch)
treebdbc56e3d0148f2c37c86cb47ddaf89e1aaa11ed /drivers/media/common/tuners/tda18271-fe.c
parentV4L/DVB (12859): go7007: semaphore -> mutex conversion (diff)
downloadlinux-81259f210ef09c6e6e643c7cecc803a7083f970e.tar.xz
linux-81259f210ef09c6e6e643c7cecc803a7083f970e.zip
V4L/DVB (12861): tda18271: add support for additional low-power standby modes
By default, the driver enters standby mode with slave tuner output loop thru enabled and xtal oscillator on. Not all designs require that slave tuner output loop thru and xtal oscillator remain active while in standby mode, so two additional standby modes have been added: - standby mode with xtal oscillator on (loop thru off) - total power off Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tda18271-fe.c')
-rw-r--r--drivers/media/common/tuners/tda18271-fe.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c
index bc4b004ba7db..64b935f91577 100644
--- a/drivers/media/common/tuners/tda18271-fe.c
+++ b/drivers/media/common/tuners/tda18271-fe.c
@@ -1017,9 +1017,17 @@ static int tda18271_sleep(struct dvb_frontend *fe)
mutex_lock(&priv->lock);
- /* standby mode w/ slave tuner output
- * & loop thru & xtal oscillator on */
- ret = tda18271_set_standby_mode(fe, 1, 0, 0);
+ switch (priv->standby_mode) {
+ case TDA18271_STANDBY_POWER_OFF:
+ ret = tda18271_set_standby_mode(fe, 1, 1, 1);
+ break;
+ case TDA18271_STANDBY_XT_ON:
+ ret = tda18271_set_standby_mode(fe, 1, 1, 0);
+ break;
+ case TDA18271_STANDBY_LT_XT_ON:
+ default:
+ ret = tda18271_set_standby_mode(fe, 1, 0, 0);
+ }
mutex_unlock(&priv->lock);
@@ -1199,6 +1207,8 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
priv->gate = (cfg) ? cfg->gate : TDA18271_GATE_AUTO;
priv->role = (cfg) ? cfg->role : TDA18271_MASTER;
priv->config = (cfg) ? cfg->config : 0;
+ priv->standby_mode = (cfg) ?
+ cfg->standby_mode : TDA18271_STANDBY_LT_XT_ON;
/* tda18271_cal_on_startup == -1 when cal
* module option is unset */