* [PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW
[not found] <20171103190329.15194-1-stefan.bruens@rwth-aachen.de>
@ 2017-11-03 19:03 ` Stefan Brüns
2017-11-03 19:17 ` Dmitry Torokhov
2017-11-03 19:03 ` [PATCH 2/4] platform/x86: intel-vbtn: support SW_TABLET_MODE Stefan Brüns
` (2 subsequent siblings)
3 siblings, 1 reply; 5+ messages in thread
From: Stefan Brüns @ 2017-11-03 19:03 UTC (permalink / raw)
To: platform-driver-x86
Cc: Stefan Brüns, Dmitry Torokhov, linux-kernel, linux-input
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(+)
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW
2017-11-03 19:03 ` [PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW Stefan Brüns
@ 2017-11-03 19:17 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2017-11-03 19:17 UTC (permalink / raw)
To: Stefan Brüns; +Cc: platform-driver-x86, linux-kernel, linux-input
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
>
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] platform/x86: intel-vbtn: support SW_TABLET_MODE
[not found] <20171103190329.15194-1-stefan.bruens@rwth-aachen.de>
2017-11-03 19:03 ` [PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW Stefan Brüns
@ 2017-11-03 19:03 ` Stefan Brüns
2017-11-03 19:03 ` [PATCH 3/4] platform/x86: intel-vbtn: support KEY_ROTATE_DISPLAY Stefan Brüns
2017-11-03 19:03 ` [PATCH 4/4] platform/x86: intel-vbtn: support panel front button Stefan Brüns
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Brüns @ 2017-11-03 19:03 UTC (permalink / raw)
To: platform-driver-x86
Cc: Stefan Brüns, AceLan Kao, Andy Shevchenko, Darren Hart,
linux-kernel
Event code 0xcc is emitted by several convertibles (Dell XPS 12 9Q33 BIOS
A8, Dell XPS 13 2in1 9365, HP Spectre x360, Lenovo Thinkpad Helix) when
entering tablet mode, and 0xcd on return to laptop mode.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
The changes where tested on an XPS 12 with BIOS version A8 (2015-03-03).
An earlier BIOS version (A2, ~2013) did not report event, at least
not using the INT33D6 plattform device.
There are other convertible laptops apparenly using the same event
codes:
https://wiki.gentoo.org/wiki/HP_Spectre_x360_(2015)
https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1678200
https://forums.opensuse.org/showthread.php/526850-Touchpad-and-trackpoint-no-longer-working-after-reattaching-convertible-keyboard
---
drivers/platform/x86/intel-vbtn.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 58c5ff36523a..e77b9143f9b3 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -42,6 +42,8 @@ static const struct key_entry intel_vbtn_keymap[] = {
{ KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */
{ KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */
{ KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release */
+ { KE_SW, 0xCC, { .sw = { SW_TABLET_MODE, 1 } } }, /* Tablet */
+ { KE_SW, 0xCD, { .sw = { SW_TABLET_MODE, 0 } } }, /* Laptop */
{ KE_END },
};
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] platform/x86: intel-vbtn: support KEY_ROTATE_DISPLAY
[not found] <20171103190329.15194-1-stefan.bruens@rwth-aachen.de>
2017-11-03 19:03 ` [PATCH 1/4] Input: sparse-keymap - send sync event for KE_SW/KW_VSW Stefan Brüns
2017-11-03 19:03 ` [PATCH 2/4] platform/x86: intel-vbtn: support SW_TABLET_MODE Stefan Brüns
@ 2017-11-03 19:03 ` Stefan Brüns
2017-11-03 19:03 ` [PATCH 4/4] platform/x86: intel-vbtn: support panel front button Stefan Brüns
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Brüns @ 2017-11-03 19:03 UTC (permalink / raw)
To: platform-driver-x86
Cc: Stefan Brüns, AceLan Kao, Andy Shevchenko, Darren Hart,
linux-kernel
The Rotate Lock button event is emitted on the XPS 12 (BIOS A8, but not
on BIOS A2).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
The changes where tested on an XPS 12 with BIOS version A8 (2015-03-03).
An earlier BIOS version (A2, ~2013) did not report the event, at least
not using the INT33D6 plattform device.
---
drivers/platform/x86/intel-vbtn.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index e77b9143f9b3..89d395b8e36d 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -42,6 +42,8 @@ static const struct key_entry intel_vbtn_keymap[] = {
{ KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */
{ KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */
{ KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* volume-down key release */
+ { KE_KEY, 0xC8, { KEY_ROTATE_DISPLAY } }, /* rotate-lock key press */
+ { KE_IGNORE, 0xC9, { KEY_ROTATE_DISPLAY } }, /* rotate-lock key release */
{ KE_SW, 0xCC, { .sw = { SW_TABLET_MODE, 1 } } }, /* Tablet */
{ KE_SW, 0xCD, { .sw = { SW_TABLET_MODE, 0 } } }, /* Laptop */
{ KE_END },
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] platform/x86: intel-vbtn: support panel front button
[not found] <20171103190329.15194-1-stefan.bruens@rwth-aachen.de>
` (2 preceding siblings ...)
2017-11-03 19:03 ` [PATCH 3/4] platform/x86: intel-vbtn: support KEY_ROTATE_DISPLAY Stefan Brüns
@ 2017-11-03 19:03 ` Stefan Brüns
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Brüns @ 2017-11-03 19:03 UTC (permalink / raw)
To: platform-driver-x86
Cc: Stefan Brüns, AceLan Kao, Andy Shevchenko, Darren Hart,
linux-kernel
The Lenovo Helix 2 and Dell XPS 12 (9Q33) have an extra button on the
front showing a 'Windows' logo, both reporting event codes 0xC2/0xC3
on press/release.
Tested on XPS 12, for info on the Helix 2 see:
https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
drivers/platform/x86/intel-vbtn.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 89d395b8e36d..4e074b2ee127 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -38,6 +38,8 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
static const struct key_entry intel_vbtn_keymap[] = {
{ KE_KEY, 0xC0, { KEY_POWER } }, /* power key press */
{ KE_IGNORE, 0xC1, { KEY_POWER } }, /* power key release */
+ { KE_KEY, 0xC2, { KEY_MENU } }, /* 'Windows' key press */
+ { KE_IGNORE, 0xC3, { KEY_MENU } }, /* 'Windows' key release */
{ KE_KEY, 0xC4, { KEY_VOLUMEUP } }, /* volume-up key press */
{ KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */
{ KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread