From: Samu Onkalo Date: Mon, 24 May 2010 21:33:37 +0000 (-0700) Subject: lis3: setup poll interval limits X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4a70a413ccfd1c14ef29a290a4d2dada04ccbefb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git lis3: setup poll interval limits Set valid adjustment window (0 - 2000ms). Signed-off-by: Samu Onkalo Acked-by: Eric Piel Cc: Daniel Mack Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 @@ /* joystick device poll interval in milliseconds */ #define MDPS_POLL_INTERVAL 50 +#define MDPS_POLL_MIN 0 +#define MDPS_POLL_MAX 2000 /* * The sensor can also generate interrupts (DRDY) but it's pretty pointless * because they are generated even if the data do not change. So it's better @@ -459,6 +461,8 @@ int lis3lv02d_joystick_enable(void) lis3_dev.idev->poll = lis3lv02d_joystick_poll; lis3_dev.idev->poll_interval = MDPS_POLL_INTERVAL; + lis3_dev.idev->poll_interval_min = MDPS_POLL_MIN; + lis3_dev.idev->poll_interval_max = MDPS_POLL_MAX; input_dev = lis3_dev.idev->input; input_dev->name = "ST LIS3LV02DL Accelerometer";