aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lis3lv02d.c
diff options
context:
space:
mode:
authorSamu Onkalo <samu.p.onkalo@nokia.com>2010-10-22 07:57:26 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2010-10-25 17:11:38 -0400
commit821f664644c2da9e1a51e36751abedf49d4332e0 (patch)
tree9fd3b69a5c1fe65f4254f5d958c29e18434b83f1 /drivers/hwmon/lis3lv02d.c
parente726111f953f8f5b922b953caf06ba6790c5fbaa (diff)
hwmon: lis3: Update coordinates at polled device open
Call input device poll function at device open to refresh coordinates immediately. This is needed for the case where poll interval is set to zero and coordinate updates happens purely under interrupt control. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Acked-by: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/lis3lv02d.c')
-rw-r--r--drivers/hwmon/lis3lv02d.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c
index d9c97e8c53ad..1095dff9b200 100644
--- a/drivers/hwmon/lis3lv02d.c
+++ b/drivers/hwmon/lis3lv02d.c
@@ -346,6 +346,11 @@ static void lis3lv02d_joystick_open(struct input_polled_dev *pidev)
346 346
347 if (lis3_dev.pdata && lis3_dev.whoami == WAI_8B && lis3_dev.idev) 347 if (lis3_dev.pdata && lis3_dev.whoami == WAI_8B && lis3_dev.idev)
348 atomic_set(&lis3_dev.wake_thread, 1); 348 atomic_set(&lis3_dev.wake_thread, 1);
349 /*
350 * Update coordinates for the case where poll interval is 0 and
351 * the chip in running purely under interrupt control
352 */
353 lis3lv02d_joystick_poll(pidev);
349} 354}
350 355
351static void lis3lv02d_joystick_close(struct input_polled_dev *pidev) 356static void lis3lv02d_joystick_close(struct input_polled_dev *pidev)