Commit 14f8af31 authored by Ike Panhc's avatar Ike Panhc Committed by Len Brown

asus-laptop: add Lenovo SL hotkey support

Lenovo SL series laptop has a very similar DSDT with Asus laptops. We can
easily have the extra ACPI function support with little modification in
asus-laptop.c

Here is the hotkey enablement for Lenovo SL series laptop.

This patch will enable the following hotkey:
 - Volumn Up
 - Volumn Down
 - Mute
 - Screen Lock (Fn+F2)
 - Battery Status (Fn+F3)
 - WLAN switch (Fn+F5)
 - Video output switch (Fn+F7)
 - Touchpad switch (Fn+F8)
 - Screen Magnifier (Fn+Space)

The following function of Lenovo SL laptop is still need to be enabled:
 - Hotkey: KEY_SUSPEND (Fn+F4), KEY_SLEEP (Fn+F12), Dock Eject (Fn+F9)
 - Rfkill for bluetooth and wlan
 - LenovoCare LED
 - Hwmon for fan speed
 - Fingerprint scanner
 - Active Protection System
Signed-off-by: default avatarIke Panhc <ike.pan@canonical.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 16851f92
...@@ -221,6 +221,7 @@ static struct asus_hotk *hotk; ...@@ -221,6 +221,7 @@ static struct asus_hotk *hotk;
*/ */
static const struct acpi_device_id asus_device_ids[] = { static const struct acpi_device_id asus_device_ids[] = {
{"ATK0100", 0}, {"ATK0100", 0},
{"ATK0101", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, asus_device_ids); MODULE_DEVICE_TABLE(acpi, asus_device_ids);
...@@ -294,6 +295,11 @@ struct key_entry { ...@@ -294,6 +295,11 @@ struct key_entry {
enum { KE_KEY, KE_END }; enum { KE_KEY, KE_END };
static struct key_entry asus_keymap[] = { static struct key_entry asus_keymap[] = {
{KE_KEY, 0x02, KEY_SCREENLOCK},
{KE_KEY, 0x05, KEY_WLAN},
{KE_KEY, 0x08, KEY_F13},
{KE_KEY, 0x17, KEY_ZOOM},
{KE_KEY, 0x1f, KEY_BATTERY},
{KE_KEY, 0x30, KEY_VOLUMEUP}, {KE_KEY, 0x30, KEY_VOLUMEUP},
{KE_KEY, 0x31, KEY_VOLUMEDOWN}, {KE_KEY, 0x31, KEY_VOLUMEDOWN},
{KE_KEY, 0x32, KEY_MUTE}, {KE_KEY, 0x32, KEY_MUTE},
...@@ -313,6 +319,8 @@ static struct key_entry asus_keymap[] = { ...@@ -313,6 +319,8 @@ static struct key_entry asus_keymap[] = {
{KE_KEY, 0x5F, KEY_WLAN}, {KE_KEY, 0x5F, KEY_WLAN},
{KE_KEY, 0x60, KEY_SWITCHVIDEOMODE}, {KE_KEY, 0x60, KEY_SWITCHVIDEOMODE},
{KE_KEY, 0x61, 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, 0x6B, KEY_F13}, /* Lock Touchpad */
{KE_KEY, 0x82, KEY_CAMERA}, {KE_KEY, 0x82, KEY_CAMERA},
{KE_KEY, 0x8A, KEY_PROG1}, {KE_KEY, 0x8A, KEY_PROG1},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment