aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-04-28 12:53:38 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:06 -0400
commitb6bd5eb871184dd976ce2d410888b2a29d90371a (patch)
tree77d02b7e639451e63178695013bbae27706cbdca /drivers/media/common
parent34a0db9202414c42763a437f9937cd8692263170 (diff)
V4L/DVB (11798): xc5000: add "no_poweroff" module option
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. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/xc5000.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index efc43123952d..bc294b9eb488 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -36,6 +36,12 @@ static int debug;
36module_param(debug, int, 0644); 36module_param(debug, int, 0644);
37MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off)."); 37MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
38 38
39static int no_poweroff;
40module_param(no_poweroff, int, 0644);
41MODULE_PARM_DESC(no_poweroff, "0 (default) powers device off when not used.\n"
42 "\t\t1 keep device energized and with tuner ready all the times.\n"
43 "\t\tFaster, but consumes more power and keeps the device hotter");
44
39static DEFINE_MUTEX(xc5000_list_mutex); 45static DEFINE_MUTEX(xc5000_list_mutex);
40static LIST_HEAD(hybrid_tuner_instance_list); 46static LIST_HEAD(hybrid_tuner_instance_list);
41 47
@@ -857,6 +863,10 @@ static int xc5000_sleep(struct dvb_frontend *fe)
857 863
858 dprintk(1, "%s()\n", __func__); 864 dprintk(1, "%s()\n", __func__);
859 865
866 /* Avoid firmware reload on slow devices */
867 if (no_poweroff)
868 return 0;
869
860 /* According to Xceive technical support, the "powerdown" register 870 /* According to Xceive technical support, the "powerdown" register
861 was removed in newer versions of the firmware. The "supported" 871 was removed in newer versions of the firmware. The "supported"
862 way to sleep the tuner is to pull the reset pin low for 10ms */ 872 way to sleep the tuner is to pull the reset pin low for 10ms */