From: Samu Onkalo Date: Fri, 22 Oct 2010 11:57:26 +0000 (-0400) Subject: hwmon: lis3: Update coordinates at polled device open X-Git-Tag: v2.6.37-rc1~118^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=821f664644c2da9e1a51e36751abedf49d4332e0;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Acked-by: Eric Piel Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index d9c97e8..1095dff 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) if (lis3_dev.pdata && lis3_dev.whoami == WAI_8B && lis3_dev.idev) atomic_set(&lis3_dev.wake_thread, 1); + /* + * Update coordinates for the case where poll interval is 0 and + * the chip in running purely under interrupt control + */ + lis3lv02d_joystick_poll(pidev); } static void lis3lv02d_joystick_close(struct input_polled_dev *pidev)