[PATCH 2/2] toshiba_acpi: Add Satellite P50W-B to alternative keymap and create new mappings.

From: Joseph Salisbury
Date: Wed Mar 04 2015 - 16:52:57 EST


BugLink: http://bugs.launchpad.net/bugs/1416277

The Toshiba Satellite P50W-B is required in the alternate keymap for all
keys to properly function. There are also some new key ids that need to
be added(PREVIOUSSONG, NEXTSONG and PLAYPAUSE). Also, the alt keymap has changed the key ids for
mute, brightness up/down. Adding those key ids to the alternate keymap as well(MUTE, BRIGHTNESSDOWN
and BRIGHTNESSUP).

Signed-off-by: Joseph Salisbury <joseph.salisbury@xxxxxxxxxxxxx>
Reported-and-tested-by: robert.ancell@xxxxxxxxxxxxx
Cc: stable@xxxxxxxxxxxxxxx
---
drivers/platform/x86/toshiba_acpi.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 333aaca..fe0d2b2 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -269,11 +269,18 @@ static const struct dmi_system_id toshiba_alt_keymap_dmi[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite-L845"),
},
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P50W-B"),
+ },
+ },
{}
};

static const struct key_entry toshiba_acpi_alt_keymap[] = {
- { KE_KEY, 0x157, { KEY_MUTE } },
+ { KE_KEY, 0x9e, { KEY_RFKILL } },
+ { KE_KEY, 0x101, { KEY_MUTE } },
{ KE_KEY, 0x102, { KEY_ZOOMOUT } },
{ KE_KEY, 0x103, { KEY_ZOOMIN } },
{ KE_KEY, 0x12c, { KEY_KBDILLUMTOGGLE } },
@@ -281,8 +288,14 @@ static const struct key_entry toshiba_acpi_alt_keymap[] = {
{ KE_KEY, 0x13e, { KEY_SWITCHVIDEOMODE } },
{ KE_KEY, 0x13c, { KEY_BRIGHTNESSDOWN } },
{ KE_KEY, 0x13d, { KEY_BRIGHTNESSUP } },
+ { KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
+ { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
+ { KE_KEY, 0x157, { KEY_MUTE } },
{ KE_KEY, 0x158, { KEY_WLAN } },
{ KE_KEY, 0x13f, { KEY_TOUCHPAD_TOGGLE } },
+ { KE_KEY, 0xb31, { KEY_PREVIOUSSONG } },
+ { KE_KEY, 0xb32, { KEY_NEXTSONG } },
+ { KE_KEY, 0xb33, { KEY_PLAYPAUSE } },
{ KE_END, 0 },
};

--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/