summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-04-28 12:53:38 -0400
committerDevin Heitmueller <dheitmueller@kernellabs.com>2009-04-28 12:53:38 -0400
commit413a852cd71a91beba74baab6cd04d6303aed136 (patch)
tree62c17902661d28e78a548bb30559a7687e52c7c0 /linux/drivers/media/common
parent72c6b08f362a4159baccf0956151cf54f0f25e2e (diff)
downloadmediapointer-dvb-s2-413a852cd71a91beba74baab6cd04d6303aed136.tar.gz
mediapointer-dvb-s2-413a852cd71a91beba74baab6cd04d6303aed136.tar.bz2
xc5000: add "no_poweroff" module option
From: Devin Heitmueller <dheitmueller@kernellabs.com> Provide for the ability for a user to disable putting the tuner to sleep, in case he doesn't want to incur the cost of reloading the firmware when starting up his/her application. The module options are intentionally identical to xc3028. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r--linux/drivers/media/common/tuners/xc5000.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/drivers/media/common/tuners/xc5000.c b/linux/drivers/media/common/tuners/xc5000.c
index 4045b2d50..f2a034b51 100644
--- a/linux/drivers/media/common/tuners/xc5000.c
+++ b/linux/drivers/media/common/tuners/xc5000.c
@@ -36,6 +36,12 @@ static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
+static int no_poweroff;
+module_param(no_poweroff, int, 0644);
+MODULE_PARM_DESC(no_poweroff, "0 (default) powers device off when not used.\n"
+ "\t\t1 keep device energized and with tuner ready all the times.\n"
+ "\t\tFaster, but consumes more power and keeps the device hotter");
+
static DEFINE_MUTEX(xc5000_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list);
@@ -865,6 +871,10 @@ static int xc5000_sleep(struct dvb_frontend *fe)
dprintk(1, "%s()\n", __func__);
+ /* Avoid firmware reload on slow devices */
+ if (no_poweroff)
+ return 0;
+
/* According to Xceive technical support, the "powerdown" register
was removed in newer versions of the firmware. The "supported"
way to sleep the tuner is to pull the reset pin low for 10ms */