* [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down
@ 2012-04-24 8:40 Alex Hung
[not found] ` <1335256852-19146-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-05-03 20:32 ` Matthew Garrett
0 siblings, 2 replies; 4+ messages in thread
From: Alex Hung @ 2012-04-24 8:40 UTC (permalink / raw)
To: alex.hung, ibm-acpi, mjg, ibm-acpi-devel, platform-driver-x86,
linux-kernel
The tp_features.bright_acpimode will not be set correctly for brightness
control because ACPI_VIDEO_HID will not be located in ACPI. As a result,
a duplicated key event will always be sent. acpi_video_backlight_support()
is sufficient to detect standard ACPI brightness control.
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
drivers/platform/x86/thinkpad_acpi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 7b82868..7d032d5 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3405,7 +3405,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
/* Do not issue duplicate brightness change events to
* userspace. tpacpi_detect_brightness_capabilities() must have
* been called before this point */
- if (tp_features.bright_acpimode && acpi_video_backlight_support()) {
+ if (acpi_video_backlight_support()) {
pr_info("This ThinkPad has standard ACPI backlight "
"brightness control, supported by the ACPI "
"video driver\n");
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down
2012-04-24 8:40 [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down Alex Hung
@ 2012-04-24 8:44 ` Alex Hung
2012-05-03 20:32 ` Matthew Garrett
1 sibling, 0 replies; 4+ messages in thread
From: Alex Hung @ 2012-04-24 8:44 UTC (permalink / raw)
To: Alex Hung
Cc: ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
platform-driver-x86-u79uwXL29TY76Z2rM5mHXA,
ibm-acpi-N3TV7GIv+o9fyO9Q7EP/yw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, mjg-H+wXaHxf7aLQT0dZR+AlfA
On 04/24/2012 04:40 PM, Alex Hung wrote:
> The tp_features.bright_acpimode will not be set correctly for brightness
> control because ACPI_VIDEO_HID will not be located in ACPI. As a result,
> a duplicated key event will always be sent. acpi_video_backlight_support()
> is sufficient to detect standard ACPI brightness control.
>
> Signed-off-by: Alex Hung<alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> ---
> drivers/platform/x86/thinkpad_acpi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 7b82868..7d032d5 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -3405,7 +3405,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
> /* Do not issue duplicate brightness change events to
> * userspace. tpacpi_detect_brightness_capabilities() must have
> * been called before this point */
> - if (tp_features.bright_acpimode&& acpi_video_backlight_support()) {
> + if (acpi_video_backlight_support()) {
> pr_info("This ThinkPad has standard ACPI backlight "
> "brightness control, supported by the ACPI "
> "video driver\n");
Hi,
I tested the patch on thinkpad x200 and x220, and the brightness up/down
key presses will no longer generate a duplicated event, i.e. output from
"sudo showkey".
Best Regards,
Alex Hung
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ibm-acpi-devel] [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down
@ 2012-04-24 8:44 ` Alex Hung
0 siblings, 0 replies; 4+ messages in thread
From: Alex Hung @ 2012-04-24 8:44 UTC (permalink / raw)
To: Alex Hung
Cc: ibm-acpi, mjg, ibm-acpi-devel, platform-driver-x86, linux-kernel
On 04/24/2012 04:40 PM, Alex Hung wrote:
> The tp_features.bright_acpimode will not be set correctly for brightness
> control because ACPI_VIDEO_HID will not be located in ACPI. As a result,
> a duplicated key event will always be sent. acpi_video_backlight_support()
> is sufficient to detect standard ACPI brightness control.
>
> Signed-off-by: Alex Hung<alex.hung@canonical.com>
> ---
> drivers/platform/x86/thinkpad_acpi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 7b82868..7d032d5 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -3405,7 +3405,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
> /* Do not issue duplicate brightness change events to
> * userspace. tpacpi_detect_brightness_capabilities() must have
> * been called before this point */
> - if (tp_features.bright_acpimode&& acpi_video_backlight_support()) {
> + if (acpi_video_backlight_support()) {
> pr_info("This ThinkPad has standard ACPI backlight "
> "brightness control, supported by the ACPI "
> "video driver\n");
Hi,
I tested the patch on thinkpad x200 and x220, and the brightness up/down
key presses will no longer generate a duplicated event, i.e. output from
"sudo showkey".
Best Regards,
Alex Hung
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down
2012-04-24 8:40 [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down Alex Hung
[not found] ` <1335256852-19146-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2012-05-03 20:32 ` Matthew Garrett
1 sibling, 0 replies; 4+ messages in thread
From: Matthew Garrett @ 2012-05-03 20:32 UTC (permalink / raw)
To: Alex Hung; +Cc: ibm-acpi, ibm-acpi-devel, platform-driver-x86, linux-kernel
Merged for -next, thanks
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-03 20:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24 8:40 [PATCH] thinkpad-acpi: fix issuing duplicated key events for brightness up/down Alex Hung
[not found] ` <1335256852-19146-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-04-24 8:44 ` Alex Hung
2012-04-24 8:44 ` [ibm-acpi-devel] " Alex Hung
2012-05-03 20:32 ` Matthew Garrett
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.