Input: sparse-keymap - send sync event for KE_SW/KE_VSW
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Fri, 3 Nov 2017 19:17:40 +0000 (12:17 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 3 Nov 2017 19:47:48 +0000 (12:47 -0700)
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>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/sparse-keymap.c

index bb0349fa64bc349c130d4f77a96fd7f3a1d525ca..fd03e55768c9f29a34112d00d3baf8d6b7336f67 100644 (file)
@@ -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;
        }
 }