]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Add P1/P2 programmable keys to the sonypi driver.
authorAndrew Morton <akpm@osdl.org>
Fri, 6 Feb 2004 00:53:26 +0000 (16:53 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 6 Feb 2004 00:53:26 +0000 (16:53 -0800)
From: Stelian Pop <stelian@popies.net>

This patch enables sonypi to successfully report P1/P2 programmable keys
events on Sony Vaio Z1 laptops.

Note however that sonypi is unable to distinguish between the two events,
both of them will be reported as SONYPI_EVENT_PKEY_P1, but one event is
better than zero, so there it is.

drivers/char/sonypi.h

index a15a789e317be865a1bcabc76d9be819715395af..78b56129e4f0e4bb8098a23d1b3f305501c5f64e 100644 (file)
@@ -239,6 +239,7 @@ static struct sonypi_event sonypi_pkeyev[] = {
        { 0x01, SONYPI_EVENT_PKEY_P1 },
        { 0x02, SONYPI_EVENT_PKEY_P2 },
        { 0x04, SONYPI_EVENT_PKEY_P3 },
+       { 0x5c, SONYPI_EVENT_PKEY_P1 },
        { 0, 0 }
 };
 
@@ -333,6 +334,7 @@ struct sonypi_eventtypes {
        { SONYPI_DEVICE_MODEL_TYPE2, 0x20, SONYPI_THUMBPHRASE_MASK, sonypi_thumbphraseev },
        { SONYPI_DEVICE_MODEL_TYPE2, 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
        { SONYPI_DEVICE_MODEL_TYPE2, 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
+       { SONYPI_DEVICE_MODEL_TYPE2, 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev },
 
        { 0, 0, 0, 0 }
 };