* [PATCH 0/8] ACPI4Asus and friends updates
@ 2012-10-03 9:26 Corentin Chary
2012-10-03 9:26 ` [PATCH 1/8] platform-drivers-x86: change my mail Corentin Chary
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, Corentin Chary
From: Corentin Chary <corentincj@iksaif.net>
Hi Matthew,
Some patches collected from AceLan and me for asus related drivers.
Nothing big, mainly keymaps and quirks.
Thanks,
AceLan Kao (5):
asus-laptop: correct a touchpad hotkey mapping
asus-laptop: add all video switch keys
asus-nb-wmi: correct a touchpad hotkey mapping
asus-nb-wmi: add all video switch keys
asus-wmi: add display toggle quirk
Corentin Chary (3):
platform-drivers-x86: change my mail
asus-laptop: map some new keys
asus-{nb-wmi|laptop}.c: sync keymaps
MAINTAINERS | 4 +-
drivers/platform/x86/asus-laptop.c | 61 ++++++++++++++++++++---------
drivers/platform/x86/asus-nb-wmi.c | 76 +++++++++++++++++++++++++++++-------
drivers/platform/x86/asus-wmi.c | 33 ++++++++++++++--
drivers/platform/x86/asus-wmi.h | 7 +++
drivers/platform/x86/eeepc-wmi.c | 2 +-
6 files changed, 142 insertions(+), 41 deletions(-)
--
1.7.8.6
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/8] platform-drivers-x86: change my mail
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 2/8] asus-laptop: map some new keys Corentin Chary
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, Corentin Chary, Matthew Garrett,
Andrew Morton, Joe Perches, Greg Kroah-Hartman, David S. Miller,
Mark Brown, linux-kernel, acpi4asus-user
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
MAINTAINERS | 4 ++--
drivers/platform/x86/asus-nb-wmi.c | 2 +-
drivers/platform/x86/asus-wmi.c | 2 +-
drivers/platform/x86/eeepc-wmi.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index fdc0119..bbf52c2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1217,7 +1217,7 @@ F: Documentation/hwmon/asc7621
F: drivers/hwmon/asc7621.c
ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS
-M: Corentin Chary <corentincj@iksaif.net>
+M: Corentin Chary <corentin.chary@gmail.com>
L: acpi4asus-user@lists.sourceforge.net
L: platform-driver-x86@vger.kernel.org
W: http://acpi4asus.sf.net
@@ -5903,7 +5903,7 @@ F: drivers/media/video/*7146*
F: include/media/*7146*
SAMSUNG LAPTOP DRIVER
-M: Corentin Chary <corentincj@iksaif.net>
+M: Corentin Chary <corentin.chary@gmail.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: drivers/platform/x86/samsung-laptop.c
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 6b0ebde..be79040 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -32,7 +32,7 @@
#define ASUS_NB_WMI_FILE "asus-nb-wmi"
-MODULE_AUTHOR("Corentin Chary <corentincj@iksaif.net>");
+MODULE_AUTHOR("Corentin Chary <corentin.chary@gmail.com>");
MODULE_DESCRIPTION("Asus Notebooks WMI Hotkey Driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 18f5169..912ec7d 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -51,7 +51,7 @@
#include "asus-wmi.h"
-MODULE_AUTHOR("Corentin Chary <corentincj@iksaif.net>, "
+MODULE_AUTHOR("Corentin Chary <corentin.chary@gmail.com>, "
"Yong Wang <yong.y.wang@intel.com>");
MODULE_DESCRIPTION("Asus Generic WMI Driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 5838332..60cb76a 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -39,7 +39,7 @@
#define EEEPC_WMI_FILE "eeepc-wmi"
-MODULE_AUTHOR("Corentin Chary <corentincj@iksaif.net>");
+MODULE_AUTHOR("Corentin Chary <corentin.chary@gmail.com>");
MODULE_DESCRIPTION("Eee PC WMI Hotkey Driver");
MODULE_LICENSE("GPL");
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/8] asus-laptop: map some new keys
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
2012-10-03 9:26 ` [PATCH 1/8] platform-drivers-x86: change my mail Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 3/8] asus-{nb-wmi|laptop}.c: sync keymaps Corentin Chary
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, Corentin Chary, Matthew Garrett,
acpi4asus-user, linux-kernel
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
drivers/platform/x86/asus-laptop.c | 3 +++
drivers/platform/x86/asus-nb-wmi.c | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 4b568df..68257ed 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -314,6 +314,8 @@ static const struct key_entry asus_keymap[] = {
{KE_KEY, 0x50, { KEY_EMAIL } },
{KE_KEY, 0x51, { KEY_WWW } },
{KE_KEY, 0x55, { KEY_CALC } },
+ {KE_IGNORE, 0x57, }, /* Battery mode */
+ {KE_IGNORE, 0x58, }, /* AC mode */
{KE_KEY, 0x5C, { KEY_SCREENLOCK } }, /* Screenlock */
{KE_KEY, 0x5D, { KEY_WLAN } },
{KE_KEY, 0x5E, { KEY_WLAN } },
@@ -325,6 +327,7 @@ static const struct key_entry asus_keymap[] = {
{KE_KEY, 0x6B, { KEY_F13 } }, /* Lock Touchpad */
{KE_KEY, 0x6C, { KEY_SLEEP } }, /* Suspend */
{KE_KEY, 0x6D, { KEY_SLEEP } }, /* Hibernate */
+ {KE_IGNORE, 0x6E, }, /* Low Battery notification */
{KE_KEY, 0x7E, { KEY_BLUETOOTH } },
{KE_KEY, 0x7D, { KEY_BLUETOOTH } },
{KE_KEY, 0x82, { KEY_CAMERA } },
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index be79040..b70425c 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -185,6 +185,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } },
{ KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } },
{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
+ { KE_IGNORE, 0x6E, }, /* Low Battery notification */
{ KE_KEY, 0x7D, { KEY_BLUETOOTH } },
{ KE_KEY, 0x7E, { KEY_BLUETOOTH } },
{ KE_KEY, 0x82, { KEY_CAMERA } },
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/8] asus-{nb-wmi|laptop}.c: sync keymaps
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
2012-10-03 9:26 ` [PATCH 1/8] platform-drivers-x86: change my mail Corentin Chary
2012-10-03 9:26 ` [PATCH 2/8] asus-laptop: map some new keys Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 4/8] asus-laptop: correct a touchpad hotkey mapping Corentin Chary
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, Corentin Chary, Matthew Garrett,
acpi4asus-user, linux-kernel
Maybe this should be shared in another module...
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
drivers/platform/x86/asus-laptop.c | 36 ++++++++++++++++++------------------
drivers/platform/x86/asus-nb-wmi.c | 24 ++++++++++++------------
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 68257ed..09c477a 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -304,40 +304,40 @@ static const struct key_entry asus_keymap[] = {
{KE_KEY, 0x30, { KEY_VOLUMEUP } },
{KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
{KE_KEY, 0x32, { KEY_MUTE } },
- {KE_KEY, 0x33, { KEY_SWITCHVIDEOMODE } },
- {KE_KEY, 0x34, { KEY_SWITCHVIDEOMODE } },
+ {KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */
+ {KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */
{KE_KEY, 0x40, { KEY_PREVIOUSSONG } },
{KE_KEY, 0x41, { KEY_NEXTSONG } },
- {KE_KEY, 0x43, { KEY_STOPCD } },
+ {KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
{KE_KEY, 0x45, { KEY_PLAYPAUSE } },
- {KE_KEY, 0x4c, { KEY_MEDIA } },
+ {KE_KEY, 0x4c, { KEY_MEDIA } }, /* WMP Key */
{KE_KEY, 0x50, { KEY_EMAIL } },
{KE_KEY, 0x51, { KEY_WWW } },
{KE_KEY, 0x55, { KEY_CALC } },
{KE_IGNORE, 0x57, }, /* Battery mode */
{KE_IGNORE, 0x58, }, /* AC mode */
{KE_KEY, 0x5C, { KEY_SCREENLOCK } }, /* Screenlock */
- {KE_KEY, 0x5D, { KEY_WLAN } },
- {KE_KEY, 0x5E, { KEY_WLAN } },
- {KE_KEY, 0x5F, { KEY_WLAN } },
+ {KE_KEY, 0x5D, { KEY_WLAN } }, /* WLAN Toggle */
+ {KE_KEY, 0x5E, { KEY_WLAN } }, /* WLAN Enable */
+ {KE_KEY, 0x5F, { KEY_WLAN } }, /* WLAN Disable */
{KE_KEY, 0x60, { KEY_SWITCHVIDEOMODE } },
- {KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } },
- {KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } },
- {KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } },
- {KE_KEY, 0x6B, { KEY_F13 } }, /* Lock Touchpad */
+ {KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* LCD Only */
+ {KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* CRT Only */
+ {KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* LCD + CRT */
+ {KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } }, /* Lock Touchpad */
{KE_KEY, 0x6C, { KEY_SLEEP } }, /* Suspend */
{KE_KEY, 0x6D, { KEY_SLEEP } }, /* Hibernate */
{KE_IGNORE, 0x6E, }, /* Low Battery notification */
- {KE_KEY, 0x7E, { KEY_BLUETOOTH } },
- {KE_KEY, 0x7D, { KEY_BLUETOOTH } },
+ {KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
+ {KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
{KE_KEY, 0x82, { KEY_CAMERA } },
- {KE_KEY, 0x88, { KEY_WLAN } },
- {KE_KEY, 0x8A, { KEY_PROG1 } },
+ {KE_KEY, 0x88, { KEY_RFKILL } }, /* Radio Toggle Key */
+ {KE_KEY, 0x8A, { KEY_PROG1 } }, /* Color enhancement mode */
{KE_KEY, 0x95, { KEY_MEDIA } },
{KE_KEY, 0x99, { KEY_PHONE } },
- {KE_KEY, 0xc4, { KEY_KBDILLUMUP } },
- {KE_KEY, 0xc5, { KEY_KBDILLUMDOWN } },
- {KE_KEY, 0xb5, { KEY_CALC } },
+ {KE_KEY, 0xB5, { KEY_CALC } },
+ {KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
+ {KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
{KE_END, 0},
};
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index b70425c..9f1caa7 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -168,9 +168,9 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */
{ KE_KEY, 0x40, { KEY_PREVIOUSSONG } },
{ KE_KEY, 0x41, { KEY_NEXTSONG } },
- { KE_KEY, 0x43, { KEY_STOPCD } },
+ { KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
{ KE_KEY, 0x45, { KEY_PLAYPAUSE } },
- { KE_KEY, 0x4c, { KEY_MEDIA } },
+ { KE_KEY, 0x4c, { KEY_MEDIA } }, /* WMP Key */
{ KE_KEY, 0x50, { KEY_EMAIL } },
{ KE_KEY, 0x51, { KEY_WWW } },
{ KE_KEY, 0x55, { KEY_CALC } },
@@ -181,25 +181,25 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
{ KE_KEY, 0x5F, { KEY_WLAN } }, /* Wireless console Disable */
{ KE_KEY, 0x60, { KEY_SWITCHVIDEOMODE } },
- { KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } },
- { KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } },
- { KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } },
+ { KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* LCD Only */
+ { KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* CRT Only */
+ { KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* LCD + CRT */
{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
{ KE_IGNORE, 0x6E, }, /* Low Battery notification */
- { KE_KEY, 0x7D, { KEY_BLUETOOTH } },
- { KE_KEY, 0x7E, { KEY_BLUETOOTH } },
+ { KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
+ { KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
{ KE_KEY, 0x82, { KEY_CAMERA } },
- { KE_KEY, 0x88, { KEY_RFKILL } },
- { KE_KEY, 0x8A, { KEY_PROG1 } },
+ { KE_KEY, 0x88, { KEY_RFKILL } }, /* Radio Toggle Key */
+ { KE_KEY, 0x8A, { KEY_PROG1 } }, /* Color enhancement mode */
{ KE_KEY, 0x95, { KEY_MEDIA } },
{ KE_KEY, 0x99, { KEY_PHONE } },
{ KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */
{ KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */
{ KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */
{ KE_KEY, 0xA3, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + HDMI */
- { KE_KEY, 0xb5, { KEY_CALC } },
- { KE_KEY, 0xc4, { KEY_KBDILLUMUP } },
- { KE_KEY, 0xc5, { KEY_KBDILLUMDOWN } },
+ { KE_KEY, 0xB5, { KEY_CALC } },
+ { KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
+ { KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
{ KE_END, 0},
};
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/8] asus-laptop: correct a touchpad hotkey mapping
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
` (2 preceding siblings ...)
2012-10-03 9:26 ` [PATCH 3/8] asus-{nb-wmi|laptop}.c: sync keymaps Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 5/8] asus-laptop: add all video switch keys Corentin Chary
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, AceLan Kao, Corentin Chary, Matthew Garrett,
acpi4asus-user, linux-kernel
From: AceLan Kao <acelan.kao@canonical.com>
0x60 is touchpad enable key, but is misdefined in the keymap.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
drivers/platform/x86/asus-laptop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 09c477a..73d0198 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -320,7 +320,7 @@ static const struct key_entry asus_keymap[] = {
{KE_KEY, 0x5D, { KEY_WLAN } }, /* WLAN Toggle */
{KE_KEY, 0x5E, { KEY_WLAN } }, /* WLAN Enable */
{KE_KEY, 0x5F, { KEY_WLAN } }, /* WLAN Disable */
- {KE_KEY, 0x60, { KEY_SWITCHVIDEOMODE } },
+ {KE_KEY, 0x60, { KEY_TOUCHPAD_ON } },
{KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* LCD Only */
{KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* CRT Only */
{KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* LCD + CRT */
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/8] asus-laptop: add all video switch keys
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
` (3 preceding siblings ...)
2012-10-03 9:26 ` [PATCH 4/8] asus-laptop: correct a touchpad hotkey mapping Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 6/8] asus-nb-wmi: correct a touchpad hotkey mapping Corentin Chary
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, AceLan Kao, Corentin Chary, Matthew Garrett,
acpi4asus-user, linux-kernel
From: AceLan Kao <acelan.kao@canonical.com>
Fill up all the video switch keys in the map.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
drivers/platform/x86/asus-laptop.c | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 73d0198..0d371d0 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -321,9 +321,13 @@ static const struct key_entry asus_keymap[] = {
{KE_KEY, 0x5E, { KEY_WLAN } }, /* WLAN Enable */
{KE_KEY, 0x5F, { KEY_WLAN } }, /* WLAN Disable */
{KE_KEY, 0x60, { KEY_TOUCHPAD_ON } },
- {KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* LCD Only */
- {KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* CRT Only */
- {KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* LCD + CRT */
+ {KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD only */
+ {KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT only */
+ {KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT */
+ {KE_KEY, 0x64, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV */
+ {KE_KEY, 0x65, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV */
+ {KE_KEY, 0x66, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV */
+ {KE_KEY, 0x67, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV */
{KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } }, /* Lock Touchpad */
{KE_KEY, 0x6C, { KEY_SLEEP } }, /* Suspend */
{KE_KEY, 0x6D, { KEY_SLEEP } }, /* Hibernate */
@@ -333,8 +337,24 @@ static const struct key_entry asus_keymap[] = {
{KE_KEY, 0x82, { KEY_CAMERA } },
{KE_KEY, 0x88, { KEY_RFKILL } }, /* Radio Toggle Key */
{KE_KEY, 0x8A, { KEY_PROG1 } }, /* Color enhancement mode */
+ {KE_KEY, 0x8C, { KEY_SWITCHVIDEOMODE } }, /* SDSP DVI only */
+ {KE_KEY, 0x8D, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + DVI */
+ {KE_KEY, 0x8E, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + DVI */
+ {KE_KEY, 0x8F, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + DVI */
+ {KE_KEY, 0x90, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + DVI */
+ {KE_KEY, 0x91, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + DVI */
+ {KE_KEY, 0x92, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + DVI */
+ {KE_KEY, 0x93, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + DVI */
{KE_KEY, 0x95, { KEY_MEDIA } },
{KE_KEY, 0x99, { KEY_PHONE } },
+ {KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */
+ {KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */
+ {KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */
+ {KE_KEY, 0xA3, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + HDMI */
+ {KE_KEY, 0xA4, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + HDMI */
+ {KE_KEY, 0xA5, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + HDMI */
+ {KE_KEY, 0xA6, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + HDMI */
+ {KE_KEY, 0xA7, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + HDMI */
{KE_KEY, 0xB5, { KEY_CALC } },
{KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
{KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/8] asus-nb-wmi: correct a touchpad hotkey mapping
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
` (4 preceding siblings ...)
2012-10-03 9:26 ` [PATCH 5/8] asus-laptop: add all video switch keys Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 7/8] asus-nb-wmi: add all video switch keys Corentin Chary
2012-10-03 9:26 ` [PATCH 8/8] asus-wmi: add display toggle quirk Corentin Chary
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, AceLan Kao, Corentin Chary, Matthew Garrett,
acpi4asus-user, linux-kernel
From: AceLan Kao <acelan.kao@canonical.com>
0x60 is touchpad enable key, but is misdefined in the keymap.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
drivers/platform/x86/asus-nb-wmi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 9f1caa7..75ce18c 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -180,7 +180,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x5D, { KEY_WLAN } }, /* Wireless console Toggle */
{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
{ KE_KEY, 0x5F, { KEY_WLAN } }, /* Wireless console Disable */
- { KE_KEY, 0x60, { KEY_SWITCHVIDEOMODE } },
+ { KE_KEY, 0x60, { KEY_TOUCHPAD_ON } },
{ KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* LCD Only */
{ KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* CRT Only */
{ KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* LCD + CRT */
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/8] asus-nb-wmi: add all video switch keys
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
` (5 preceding siblings ...)
2012-10-03 9:26 ` [PATCH 6/8] asus-nb-wmi: correct a touchpad hotkey mapping Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
2012-10-03 9:26 ` [PATCH 8/8] asus-wmi: add display toggle quirk Corentin Chary
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, AceLan Kao, Corentin Chary, Matthew Garrett,
acpi4asus-user, linux-kernel
From: AceLan Kao <acelan.kao@canonical.com>
Fill up all the video switch keys in the map.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
---
drivers/platform/x86/asus-nb-wmi.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 75ce18c..87d45e0 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -181,9 +181,13 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
{ KE_KEY, 0x5F, { KEY_WLAN } }, /* Wireless console Disable */
{ KE_KEY, 0x60, { KEY_TOUCHPAD_ON } },
- { KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* LCD Only */
- { KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* CRT Only */
- { KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* LCD + CRT */
+ { KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD only */
+ { KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT only */
+ { KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT */
+ { KE_KEY, 0x64, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV */
+ { KE_KEY, 0x65, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV */
+ { KE_KEY, 0x66, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV */
+ { KE_KEY, 0x67, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV */
{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
{ KE_IGNORE, 0x6E, }, /* Low Battery notification */
{ KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
@@ -191,12 +195,24 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
{ KE_KEY, 0x82, { KEY_CAMERA } },
{ KE_KEY, 0x88, { KEY_RFKILL } }, /* Radio Toggle Key */
{ KE_KEY, 0x8A, { KEY_PROG1 } }, /* Color enhancement mode */
+ { KE_KEY, 0x8C, { KEY_SWITCHVIDEOMODE } }, /* SDSP DVI only */
+ { KE_KEY, 0x8D, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + DVI */
+ { KE_KEY, 0x8E, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + DVI */
+ { KE_KEY, 0x8F, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + DVI */
+ { KE_KEY, 0x90, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + DVI */
+ { KE_KEY, 0x91, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + DVI */
+ { KE_KEY, 0x92, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + DVI */
+ { KE_KEY, 0x93, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + DVI */
{ KE_KEY, 0x95, { KEY_MEDIA } },
{ KE_KEY, 0x99, { KEY_PHONE } },
{ KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */
{ KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */
{ KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */
{ KE_KEY, 0xA3, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + HDMI */
+ { KE_KEY, 0xA4, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + HDMI */
+ { KE_KEY, 0xA5, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + HDMI */
+ { KE_KEY, 0xA6, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + HDMI */
+ { KE_KEY, 0xA7, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + HDMI */
{ KE_KEY, 0xB5, { KEY_CALC } },
{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 8/8] asus-wmi: add display toggle quirk
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
` (6 preceding siblings ...)
2012-10-03 9:26 ` [PATCH 7/8] asus-nb-wmi: add all video switch keys Corentin Chary
@ 2012-10-03 9:26 ` Corentin Chary
7 siblings, 0 replies; 9+ messages in thread
From: Corentin Chary @ 2012-10-03 9:26 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, AceLan Kao, Corentin Chary, Corentin Chary,
Matthew Garrett, acpi4asus-user, linux-kernel
From: AceLan Kao <acelan.kao@canonical.com>
For machines with AMD graphic chips, it will send out WMI event and ACPI
interrupt at the same time while hitting the hotkey. BIOS will notify the
system the next display output mode throught WMI event code, so that
windows' application can show an OSD to tell the user which mode will be
taken effect. User can hit the display toggle key many times within 2
seconds to choose the mode they want. After 2 seconds, WMI dirver should
send a WMIMethod(SDSP) command to tell the BIOS which mode the user chose.
And then BIOS will raise another ACPI interrupt to tell the system to
really switch the display mode.
In Linux desktop, we don't have this kind of OSD to let users to choose
the mode they want, so we don't need to call WMIMethod(SDSP) to have
another ACPI interrupt. To simplify the problem, we just have to ignore
the WMI event, and let the first ACPI interrupt to send out the key event.
For the need, here comes another quirk to add machines with this kind of
behavior. When the WMI driver receives the display toggle WMI event, and
found the machin is in the list, it will do nothing and let ACPI video
driver to report the key event.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
drivers/platform/x86/asus-nb-wmi.c | 31 ++++++++++++++++++++++++++++++-
drivers/platform/x86/asus-wmi.c | 31 ++++++++++++++++++++++++++++---
drivers/platform/x86/asus-wmi.h | 7 +++++++
3 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 87d45e0..9aa6642 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -59,6 +59,17 @@ static struct quirk_entry quirk_asus_unknown = {
.wapf = 0,
};
+/*
+ * For those machines that need software to control bt/wifi status
+ * and can't adjust brightness through ACPI interface
+ * and have duplicate events(ACPI and WMI) for display toggle
+ */
+static struct quirk_entry quirk_asus_x55u = {
+ .wapf = 4,
+ .wmi_backlight_power = true,
+ .no_display_toggle = true,
+};
+
static struct quirk_entry quirk_asus_x401u = {
.wapf = 4,
};
@@ -77,6 +88,15 @@ static struct dmi_system_id asus_quirks[] = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X401U"),
},
+ .driver_data = &quirk_asus_x55u,
+ },
+ {
+ .callback = dmi_matched,
+ .ident = "ASUSTeK COMPUTER INC. X401A",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "X401A"),
+ },
.driver_data = &quirk_asus_x401u,
},
{
@@ -95,6 +115,15 @@ static struct dmi_system_id asus_quirks[] = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X501U"),
},
+ .driver_data = &quirk_asus_x55u,
+ },
+ {
+ .callback = dmi_matched,
+ .ident = "ASUSTeK COMPUTER INC. X501A",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "X501A"),
+ },
.driver_data = &quirk_asus_x401u,
},
{
@@ -131,7 +160,7 @@ static struct dmi_system_id asus_quirks[] = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X55U"),
},
- .driver_data = &quirk_asus_x401u,
+ .driver_data = &quirk_asus_x55u,
},
{
.callback = dmi_matched,
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 912ec7d..b4db530 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1341,6 +1341,23 @@ static void asus_wmi_backlight_exit(struct asus_wmi *asus)
asus->backlight_device = NULL;
}
+static int is_display_toggle(int code)
+{
+ /* display toggle keys */
+ if ((code >= 0x61 && code <= 0x67) ||
+ (code >= 0x8c && code <= 0x93) ||
+ (code >= 0xa0 && code <= 0xa7) ||
+ (code >= 0xd0 && code <= 0xd5))
+ return 1;
+
+ return 0;
+}
+
+static void do_nothing(void)
+{
+ return;
+}
+
static void asus_wmi_notify(u32 value, void *context)
{
struct asus_wmi *asus = context;
@@ -1380,10 +1397,18 @@ static void asus_wmi_notify(u32 value, void *context)
code = NOTIFY_BRNDOWN_MIN;
if (code == NOTIFY_BRNUP_MIN || code == NOTIFY_BRNDOWN_MIN) {
- if (!acpi_video_backlight_support())
+ if (!acpi_video_backlight_support()) {
asus_wmi_backlight_notify(asus, orig_code);
- } else if (!sparse_keymap_report_event(asus->inputdev, code,
- key_value, autorelease))
+ }
+ goto exit;
+ }
+
+ if (is_display_toggle(code) &&
+ asus->driver->quirks->no_display_toggle) {
+ goto exit;
+
+ if (!sparse_keymap_report_event(asus->inputdev, code,
+ key_value, autorelease))
pr_info("Unknown key %x pressed\n", code);
exit:
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index 4c9bd38..776524c 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -41,6 +41,13 @@ struct quirk_entry {
bool store_backlight_power;
bool wmi_backlight_power;
int wapf;
+ /*
+ * For machines with AMD graphic chips, it will send out WMI event
+ * and ACPI interrupt at the same time while hitting the hotkey.
+ * To simplify the problem, we just have to ignore the WMI event,
+ * and let the ACPI interrupt to send out the key event.
+ */
+ int no_display_toggle;
};
struct asus_wmi_driver {
--
1.7.8.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-03 9:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 9:26 [PATCH 0/8] ACPI4Asus and friends updates Corentin Chary
2012-10-03 9:26 ` [PATCH 1/8] platform-drivers-x86: change my mail Corentin Chary
2012-10-03 9:26 ` [PATCH 2/8] asus-laptop: map some new keys Corentin Chary
2012-10-03 9:26 ` [PATCH 3/8] asus-{nb-wmi|laptop}.c: sync keymaps Corentin Chary
2012-10-03 9:26 ` [PATCH 4/8] asus-laptop: correct a touchpad hotkey mapping Corentin Chary
2012-10-03 9:26 ` [PATCH 5/8] asus-laptop: add all video switch keys Corentin Chary
2012-10-03 9:26 ` [PATCH 6/8] asus-nb-wmi: correct a touchpad hotkey mapping Corentin Chary
2012-10-03 9:26 ` [PATCH 7/8] asus-nb-wmi: add all video switch keys Corentin Chary
2012-10-03 9:26 ` [PATCH 8/8] asus-wmi: add display toggle quirk Corentin Chary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox