linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.0-rc1] Input: omap-keypad: add missing input_sync()
@ 2011-06-03 20:26 Janusz Krzysztofik
  2011-06-04 12:35 ` Henrik Rydberg
  0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2011-06-03 20:26 UTC (permalink / raw)
  To: linux-input; +Cc: Dmitry Torokhov

Otherwise the updated evdev driver (commit 
cdda911c34006f1089f3c87b1a1f31ab3a4722f2, "Input: evdev - only signal 
polls on full packets") no longer works on top of omap-keypad.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
 drivers/input/keyboard/omap-keypad.c |    4 ++++
 1 file changed, 4 insertions(+)

--- git/drivers/input/keyboard/omap-keypad.c.orig	2011-05-30 22:16:50.000000000 +0200
+++ git/drivers/input/keyboard/omap-keypad.c	2011-06-03 22:22:18.000000000 +0200
@@ -169,6 +169,7 @@ static void omap_kp_tasklet(unsigned lon
 	unsigned char new_state[8], changed, key_down = 0;
 	int col, row;
 	int spurious = 0;
+	bool need_sync = false;
 
 	/* check for any changes */
 	omap_kp_scan_keypad(omap_kp_data, new_state);
@@ -206,9 +207,12 @@ static void omap_kp_tasklet(unsigned lon
 			kp_cur_group = key & GROUP_MASK;
 			input_report_key(omap_kp_data->input, key & ~GROUP_MASK,
 					 new_state[col] & (1 << row));
+			need_sync = true;
 #endif
 		}
 	}
+	if (need_sync)
+		input_sync(omap_kp_data->input);
 	memcpy(keypad_state, new_state, sizeof(keypad_state));
 
 	if (key_down) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3.0-rc1] Input: omap-keypad: add missing input_sync()
  2011-06-03 20:26 [PATCH 3.0-rc1] Input: omap-keypad: add missing input_sync() Janusz Krzysztofik
@ 2011-06-04 12:35 ` Henrik Rydberg
  2011-06-04 15:00   ` [PATCH 3.0-rc1 v2] " Janusz Krzysztofik
  0 siblings, 1 reply; 4+ messages in thread
From: Henrik Rydberg @ 2011-06-04 12:35 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: linux-input, Dmitry Torokhov

Hi Janusz,

> Otherwise the updated evdev driver (commit 
> cdda911c34006f1089f3c87b1a1f31ab3a4722f2, "Input: evdev - only signal 
> polls on full packets") no longer works on top of omap-keypad.
> 
> Tested on Amstrad Delta.
> 
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> ---
>  drivers/input/keyboard/omap-keypad.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- git/drivers/input/keyboard/omap-keypad.c.orig	2011-05-30 22:16:50.000000000 +0200
> +++ git/drivers/input/keyboard/omap-keypad.c	2011-06-03 22:22:18.000000000 +0200
> @@ -169,6 +169,7 @@ static void omap_kp_tasklet(unsigned lon
>  	unsigned char new_state[8], changed, key_down = 0;
>  	int col, row;
>  	int spurious = 0;
> +	bool need_sync = false;

No need for a special variable here - the input core already does the same thing.

>  
>  	/* check for any changes */
>  	omap_kp_scan_keypad(omap_kp_data, new_state);
> @@ -206,9 +207,12 @@ static void omap_kp_tasklet(unsigned lon
>  			kp_cur_group = key & GROUP_MASK;
>  			input_report_key(omap_kp_data->input, key & ~GROUP_MASK,
>  					 new_state[col] & (1 << row));
> +			need_sync = true;
>  #endif
>  		}
>  	}
> +	if (need_sync)
> +		input_sync(omap_kp_data->input);
>  	memcpy(keypad_state, new_state, sizeof(keypad_state));
>  
>  	if (key_down) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3.0-rc1 v2] Input: omap-keypad: add missing input_sync()
  2011-06-04 12:35 ` Henrik Rydberg
@ 2011-06-04 15:00   ` Janusz Krzysztofik
  2011-06-04 21:49     ` Henrik Rydberg
  0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2011-06-04 15:00 UTC (permalink / raw)
  To: Henrik Rydberg; +Cc: linux-input, Dmitry Torokhov

Otherwise the updated evdev driver (commit cdda911c34006f1089f3c87b1a1f, 
"Input: evdev - only signal polls on full packets") no longer works on 
top of omap-keypad.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
v1 -> v2 change, suggested by Henrik Rydberg (thanks!):
- no need for a special variable tracing if input_sync is required - 
  the input core already does the same thing.

 drivers/input/keyboard/omap-keypad.c |    1 +
 1 file changed, 1 insertion(+)

--- git/drivers/input/keyboard/omap-keypad.c.orig	2011-06-04 16:18:37.000000000 +0200
+++ git/drivers/input/keyboard/omap-keypad.c	2011-06-04 16:46:23.000000000 +0200
@@ -209,6 +209,7 @@ static void omap_kp_tasklet(unsigned lon
 #endif
 		}
 	}
+	input_sync(omap_kp_data->input);
 	memcpy(keypad_state, new_state, sizeof(keypad_state));
 
 	if (key_down) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3.0-rc1 v2] Input: omap-keypad: add missing input_sync()
  2011-06-04 15:00   ` [PATCH 3.0-rc1 v2] " Janusz Krzysztofik
@ 2011-06-04 21:49     ` Henrik Rydberg
  0 siblings, 0 replies; 4+ messages in thread
From: Henrik Rydberg @ 2011-06-04 21:49 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: linux-input, Dmitry Torokhov

On Sat, Jun 04, 2011 at 05:00:41PM +0200, Janusz Krzysztofik wrote:
> Otherwise the updated evdev driver (commit cdda911c34006f1089f3c87b1a1f, 
> "Input: evdev - only signal polls on full packets") no longer works on 
> top of omap-keypad.
> 
> Tested on Amstrad Delta.
> 
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> ---
> v1 -> v2 change, suggested by Henrik Rydberg (thanks!):
> - no need for a special variable tracing if input_sync is required - 
>   the input core already does the same thing.
> 
>  drivers/input/keyboard/omap-keypad.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- git/drivers/input/keyboard/omap-keypad.c.orig	2011-06-04 16:18:37.000000000 +0200
> +++ git/drivers/input/keyboard/omap-keypad.c	2011-06-04 16:46:23.000000000 +0200
> @@ -209,6 +209,7 @@ static void omap_kp_tasklet(unsigned lon
>  #endif
>  		}
>  	}
> +	input_sync(omap_kp_data->input);
>  	memcpy(keypad_state, new_state, sizeof(keypad_state));
>  
>  	if (key_down) {

    Reviewed-by: Henrik Rydberg <rydberg@euromail.se>

Thanks,
Henrik

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-04 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 20:26 [PATCH 3.0-rc1] Input: omap-keypad: add missing input_sync() Janusz Krzysztofik
2011-06-04 12:35 ` Henrik Rydberg
2011-06-04 15:00   ` [PATCH 3.0-rc1 v2] " Janusz Krzysztofik
2011-06-04 21:49     ` Henrik Rydberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).