This new parameter allows the polling frequency to be configured while keeping the default of once every millisecond. Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> Cc: Kwangwoo Lee <kwlee@xxxxxxxxxxxxxx> Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx> --- drivers/input/touchscreen/tsc2007.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscreen/tsc2007.c index 43b5c09..cdaf06f 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -27,8 +27,6 @@ #include <linux/i2c.h> #include <linux/i2c/tsc2007.h> -#define TS_POLL_PERIOD 1 /* ms delay between samples */ - #define TSC2007_MEASURE_TEMP0 (0x0 << 4) #define TSC2007_MEASURE_AUX (0x2 << 4) #define TSC2007_MEASURE_TEMP1 (0x4 << 4) @@ -86,6 +84,10 @@ static int poll_delay = 1; module_param(poll_delay, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(poll_delay, "Delay (in ms) after pen-down event before polling starts"); +static int poll_period = 1; +module_param(poll_period, int, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(poll_period, "Time (in ms) between successive samples"); + static int max_rt = MAX_12BIT; module_param(max_rt, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(max_rt, "Maximum resistance above which samples are ignored"); @@ -236,7 +238,7 @@ static void tsc2007_work(struct work_struct *work) out: if (ts->pendown || debounced) schedule_delayed_work(&ts->work, - msecs_to_jiffies(TS_POLL_PERIOD)); + msecs_to_jiffies(poll_period)); else enable_irq(ts->irq); } -- 1.7.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html