aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lis3lv02d.c
diff options
context:
space:
mode:
authorSamu Onkalo <samu.p.onkalo@nokia.com>2010-05-24 17:33:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:07 -0400
commit4a70a413ccfd1c14ef29a290a4d2dada04ccbefb (patch)
treeea7469bf991203140efa981788c2bfe6923258b1 /drivers/hwmon/lis3lv02d.c
parent6d94d4081048756df78444a07201156f4930fe48 (diff)
lis3: setup poll interval limits
Set valid adjustment window (0 - 2000ms). Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Cc: Daniel Mack <daniel@caiaq.de> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon/lis3lv02d.c')
-rw-r--r--drivers/hwmon/lis3lv02d.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c
index 56a1d34d3670..6138f036b159 100644
--- a/drivers/hwmon/lis3lv02d.c
+++ b/drivers/hwmon/lis3lv02d.c
@@ -41,6 +41,8 @@
41 41
42/* joystick device poll interval in milliseconds */ 42/* joystick device poll interval in milliseconds */
43#define MDPS_POLL_INTERVAL 50 43#define MDPS_POLL_INTERVAL 50
44#define MDPS_POLL_MIN 0
45#define MDPS_POLL_MAX 2000
44/* 46/*
45 * The sensor can also generate interrupts (DRDY) but it's pretty pointless 47 * The sensor can also generate interrupts (DRDY) but it's pretty pointless
46 * because they are generated even if the data do not change. So it's better 48 * because they are generated even if the data do not change. So it's better
@@ -459,6 +461,8 @@ int lis3lv02d_joystick_enable(void)
459 461
460 lis3_dev.idev->poll = lis3lv02d_joystick_poll; 462 lis3_dev.idev->poll = lis3lv02d_joystick_poll;
461 lis3_dev.idev->poll_interval = MDPS_POLL_INTERVAL; 463 lis3_dev.idev->poll_interval = MDPS_POLL_INTERVAL;
464 lis3_dev.idev->poll_interval_min = MDPS_POLL_MIN;
465 lis3_dev.idev->poll_interval_max = MDPS_POLL_MAX;
462 input_dev = lis3_dev.idev->input; 466 input_dev = lis3_dev.idev->input;
463 467
464 input_dev->name = "ST LIS3LV02DL Accelerometer"; 468 input_dev->name = "ST LIS3LV02DL Accelerometer";