From 5b1b119c6df594dd8c8ca4a0344d0ec15031e4b0 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 18 Mar 2011 14:10:23 -0700 Subject: [PATCH] input: gpio_matrix: send input_sync after reporting keys Signed-off-by: jeffbrown@android.com Change-Id: I9bd2437503b48bf37f4d93505ccd2806e4aab977 --- drivers/input/misc/gpio_matrix.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/input/misc/gpio_matrix.c b/drivers/input/misc/gpio_matrix.c index 5679f52..eaa9e89 100644 --- a/drivers/input/misc/gpio_matrix.c +++ b/drivers/input/misc/gpio_matrix.c @@ -130,6 +130,14 @@ static void report_key(struct gpio_kp *kp, int key_index, int out, int in) } } +static void report_sync(struct gpio_kp *kp) +{ + int i; + + for (i = 0; i < kp->input_devs->count; i++) + input_sync(kp->input_devs->dev[i]); +} + static enum hrtimer_restart gpio_keypad_timer_func(struct hrtimer *timer) { int out, in; @@ -191,6 +199,7 @@ static enum hrtimer_restart gpio_keypad_timer_func(struct hrtimer *timer) for (out = 0; out < mi->noutputs; out++) for (in = 0; in < mi->ninputs; in++, key_index++) report_key(kp, key_index, out, in); + report_sync(kp); } if (!kp->use_irq || kp->some_keys_pressed) { hrtimer_start(timer, mi->poll_time, HRTIMER_MODE_REL); -- 2.7.4