diff mbox

[1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW

Message ID 8c454b54-98a7-492d-b861-83d125306f86@rwthex-w2-a.rwth-ad.de (mailing list archive)
State Accepted
Headers show

Commit Message

Stefan Brüns Nov. 3, 2017, 7:03 p.m. UTC
Sync events are sent by sparse_keymap_report_entry for normal KEY_*
events, and are generated by several drivers after generating
SW_* events, so sparse_keymap_report_entry should do the same.

Without the sync, events are accumulated in the kernel.

Currently, no driver uses sparse-keymap for SW_* events, but
it is required for the intel-vbtn platform driver to generate
SW_TABLET_MODE events.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---

 drivers/input/sparse-keymap.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dmitry Torokhov Nov. 3, 2017, 7:17 p.m. UTC | #1
On Fri, Nov 03, 2017 at 08:03:26PM +0100, Stefan Brüns wrote:
> Sync events are sent by sparse_keymap_report_entry for normal KEY_*
> events, and are generated by several drivers after generating
> SW_* events, so sparse_keymap_report_entry should do the same.
> 
> Without the sync, events are accumulated in the kernel.
> 
> Currently, no driver uses sparse-keymap for SW_* events, but
> it is required for the intel-vbtn platform driver to generate
> SW_TABLET_MODE events.
> 
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

Applied, thank you.

> ---
> 
>  drivers/input/sparse-keymap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c
> index bb0349fa64bc..fd03e55768c9 100644
> --- a/drivers/input/sparse-keymap.c
> +++ b/drivers/input/sparse-keymap.c
> @@ -255,6 +255,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
>  
>  	case KE_VSW:
>  		input_report_switch(dev, ke->sw.code, value);
> +		input_sync(dev);
>  		break;
>  	}
>  }
> -- 
> 2.14.3
>
diff mbox

Patch

diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c
index bb0349fa64bc..fd03e55768c9 100644
--- a/drivers/input/sparse-keymap.c
+++ b/drivers/input/sparse-keymap.c
@@ -255,6 +255,7 @@  void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
 
 	case KE_VSW:
 		input_report_switch(dev, ke->sw.code, value);
+		input_sync(dev);
 		break;
 	}
 }