platform/x86: intel-hid: Missing power button release on some Dell models
PATCH 1/1 platform/x86: intel-hid: Missing power button release on some Dell models
Power button suspend for some Dell models was added in:
commit 821b85366284 (intel-hid: Power button suspend on Dell Latitude 7275)
by checking against the power button press notification (0xCE) to report the power button press event. The corresponding power button release notification (0xCF) was caught and ignored to stop it from being reported as an "unknown event" in the logs.
The missing button release event is creating issues on Android-x86, as reported on the project mailing list for a Dell Latitude 5175 model, since the events are expected in down/up pairs.
Report the power button release event to fix this issue.
--- drivers/platform/x86/intel-hid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/platform/x86/intel-hid.c +5 -2
@@ -363,7 +363,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)* the 5-button array, but still send notifies with power button * event code to this device object on power button actions. * -* Report the power button press; catch and ignore the button release. +* Report the power button press and release. */ if (!priv->array) {if (event ==0xce ) {
@@ -372,8 +372,11 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)return ; } -if (event ==0xcf ) +if (event ==0xcf ) { +input_report_key (priv->input_dev,KEY_POWER ,0 ); +input_sync (priv->input_dev);return ; + } }/* 0xC0 is for HID events, other values are for 5 button array */
Signature · 1 line
2.11.0
Quoted 66 lines
-----Original Message-----
From: [email protected] <platform-driver-x86- [email protected]> On Behalf Of Jérôme de Bretagne
Sent: Sunday, January 6, 2019 11:57 AM
To: Alex Hung
Cc: [email protected]; Andy Shevchenko; Darren Hart; Limonciello, Mario; Rafael J. Wysocki; Chih-Wei Huang; Tristian Celestin; linux- [email protected]
Subject: [PATCH] platform/x86: intel-hid: Missing power button release on some Dell models[EXTERNAL EMAIL]
Power button suspend for some Dell models was added in:
commit
821b85366284(intel-hid: Power button suspend on Dell Latitude 7275)by checking against the power button press notification (
0xCE) to report the power button press event. The corresponding power button release notification (0xCF) was caught and ignored to stop it from being reported as an "unknown event" in the logs.The missing button release event is creating issues on Android-x86, as reported on the project mailing list for a Dell Latitude 5175 model, since the events are expected in down/up pairs.
Report the power button release event to fix this issue.
Tested-by Tristian Celestin <[email protected]>Tested-by Jérôme de Bretagne <[email protected]>Signed-off-by Jérôme de Bretagne <[email protected]>--- drivers/platform/x86/intel-hid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/platform/x86/intel-hid.c +1
-1@@ -363,7 +363,7 @@ static void notify_handler(acpi_handle handle, u32 event,void *context) * the 5-button array, but still send notifies with power button * event code to this device object on power button actions. * -* Report the power button press; catch and ignore the button release. +* Report the power button press and release. */ if (!priv->array) {drivers/platform/x86/intel-hid.c +4
-1if (event ==0xce ) {@@ -372,8 +372,11 @@ static void notify_handler(acpi_handle handle, u32 event, void *context) return; } -if (event ==0xcf ) +if (event ==0xcf ) { +input_report_key (priv->input_dev,KEY_POWER ,0 ); +input_sync (priv->input_dev);return ; + } }
Quoted 3 lines
/*
0xC0is for HID events, other values are for 5 button array */
--
2.11.0
Quoted 14 lines · On Mon, Jan 07, 2019 at 03:36:48PM +0000, [email protected] wrote:
Quoted 14 lines
-----Original Message-----
From: [email protected] <platform-driver-x86- [email protected]> On Behalf Of Jérôme de Bretagne
Sent: Sunday, January 6, 2019 11:57 AM
To: Alex Hung
Cc: [email protected]; Andy Shevchenko; Darren Hart; Limonciello, Mario; Rafael J. Wysocki; Chih-Wei Huang; Tristian Celestin; linux- [email protected]
Subject: [PATCH] platform/x86: intel-hid: Missing power button release on some Dell models
Quoted 5 lines
Quoted 5 lines
[EXTERNAL EMAIL]
Power button suspend for some Dell models was added in:
commit
821b85366284(intel-hid: Power button suspend on Dell Latitude 7275)
I've addressed this one, but please do run checkpatch and correct reported errors in the future. It checks commit reference format.
Quoted 10 lines
Quoted 10 lines
by checking against the power button press notification (
0xCE) to report the power button press event. The corresponding power button release notification (0xCF) was caught and ignored to stop it from being reported as an "unknown event" in the logs.The missing button release event is creating issues on Android-x86, as reported on the project mailing list for a Dell Latitude 5175 model, since the events are expected in down/up pairs.
Quoted 6 lines
Quoted 6 lines
Report the power button release event to fix this issue.
Queued for testing, thanks for the patch.
Signature · 2 lines
Darren Hart VMware Open Source Technology Center