* [PATCH] platform/x86: ideapad-laptop: Squelch ACPI event 1
@ 2017-05-14 17:44 Hao Wei Tee
0 siblings, 0 replies; 3+ messages in thread
From: Hao Wei Tee @ 2017-05-14 17:44 UTC (permalink / raw)
To: platform-driver-x86; +Cc: ike.pan
Don't simply throw this to userspace via the sparse_keymap (which does not
have a mapping for scancode 1), as this causes KEY_UNKNOWN to be emitted,
which is a nuisance and of no use at all (it is not the right way to expose
this ACPI event to userspace, anyway, and the original intention of the commit
which added this (cfee5d63767b2e7997c1f36420d008abbe61565c) was only to suppress
an unhandled event log message).
Signed-off-by: Hao Wei Tee <angelsl@angelsl.xyz>
---
drivers/platform/x86/ideapad-laptop.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 24ca9fbe31cc..998da7b4cd8e 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -810,7 +810,6 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)
case 8:
case 7:
case 6:
- case 1:
ideapad_input_report(priv, vpc_bit);
break;
case 5:
@@ -828,6 +827,13 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data)
case 0:
ideapad_check_special_buttons(priv);
break;
+ case 1:
+ /* Some IdeaPads report event 1 every ~20
+ * seconds while on battery power; some
+ * report this when changing to/from tablet
+ * mode. Squelch this event.
+ */
+ break;
default:
pr_info("Unknown event: %lu\n", vpc_bit);
}
--
2.12.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] platform/x86: ideapad-laptop: Squelch ACPI event 1
@ 2017-05-14 17:17 Hao Wei Tee
2017-05-14 17:31 ` Hao Wei Tee
0 siblings, 1 reply; 3+ messages in thread
From: Hao Wei Tee @ 2017-05-14 17:17 UTC (permalink / raw)
To: platform-driver-x86; +Cc: ike.pan
Don't simply throw this to userspace via the sparse_keymap (which does not
have a mapping for scancode 1), as this causes KEY_UNKNOWN to be emitted,
which is a nuisance and of no use at all (it is not the right way to expose
this ACPI event to userspace, anyway, and the original intention of the commit
which added this (cfee5d63767b2e7997c1f36420d008abbe61565c) was only to suppress
an unhandled event log message).
Signed-off-by: Hao Wei Tee <angelsl@angelsl.xyz>
---
drivers/platform/x86/ideapad-laptop.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c
b/drivers/platform/x86/ideapad-laptop.c
index 24ca9fbe31cc..998da7b4cd8e 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -810,7 +810,6 @@ static void ideapad_acpi_notify(acpi_handle
handle, u32 event, void *data)
case 8:
case 7:
case 6:
- case 1:
ideapad_input_report(priv, vpc_bit);
break;
case 5:
@@ -828,6 +827,13 @@ static void ideapad_acpi_notify(acpi_handle
handle, u32 event, void *data)
case 0:
ideapad_check_special_buttons(priv);
break;
+ case 1:
+ /* Some IdeaPads report event 1 every ~20
+ * seconds while on battery power; some
+ * report this when changing to/from tablet
+ * mode. Squelch this event.
+ */
+ break;
default:
pr_info("Unknown event: %lu\n", vpc_bit);
}
--
2.12.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] platform/x86: ideapad-laptop: Squelch ACPI event 1
2017-05-14 17:17 Hao Wei Tee
@ 2017-05-14 17:31 ` Hao Wei Tee
0 siblings, 0 replies; 3+ messages in thread
From: Hao Wei Tee @ 2017-05-14 17:31 UTC (permalink / raw)
To: platform-driver-x86
Kindly ignore this, Gmail has hardwrapped and destroyed the patch file. Sorry.
On Mon, May 15, 2017 at 1:17 AM, Hao Wei Tee <angelsl@angelsl.xyz> wrote:
> Don't simply throw this to userspace via the sparse_keymap (which does not
> have a mapping for scancode 1), as this causes KEY_UNKNOWN to be emitted,
> which is a nuisance and of no use at all (it is not the right way to expose
> this ACPI event to userspace, anyway, and the original intention of the commit
> which added this (cfee5d63767b2e7997c1f36420d008abbe61565c) was only to suppress
> an unhandled event log message).
>
> Signed-off-by: Hao Wei Tee <angelsl@angelsl.xyz>
> ---
> drivers/platform/x86/ideapad-laptop.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c
> b/drivers/platform/x86/ideapad-laptop.c
> index 24ca9fbe31cc..998da7b4cd8e 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -810,7 +810,6 @@ static void ideapad_acpi_notify(acpi_handle
> handle, u32 event, void *data)
> case 8:
> case 7:
> case 6:
> - case 1:
> ideapad_input_report(priv, vpc_bit);
> break;
> case 5:
> @@ -828,6 +827,13 @@ static void ideapad_acpi_notify(acpi_handle
> handle, u32 event, void *data)
> case 0:
> ideapad_check_special_buttons(priv);
> break;
> + case 1:
> + /* Some IdeaPads report event 1 every ~20
> + * seconds while on battery power; some
> + * report this when changing to/from tablet
> + * mode. Squelch this event.
> + */
> + break;
> default:
> pr_info("Unknown event: %lu\n", vpc_bit);
> }
> --
> 2.12.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-14 17:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-14 17:44 [PATCH] platform/x86: ideapad-laptop: Squelch ACPI event 1 Hao Wei Tee
-- strict thread matches above, loose matches on Subject: below --
2017-05-14 17:17 Hao Wei Tee
2017-05-14 17:31 ` Hao Wei Tee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.