[PATCH 1/1] UBUNTU: SAUCE: sony-laptop: add support for Sony Vaio FW series function/media keys

Andy Whitcroft apw at canonical.com
Wed Mar 18 19:30:01 UTC 2009


From: Anton Veretenenko <anton at veretenenko.ru>

Bug: #307592

Add support of brightness, zoom, sleep Fn keys and S1, AV media keys for
the Sony Vaio FW series laptops to the sony-laptop module.

Signed-off-by: Anton Veretenenko <anton at veretenenko.ru>
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 drivers/misc/sony-laptop.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 6dc77d8..4946dc4 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -851,6 +851,28 @@ static struct sony_nc_event sony_C_events[] = {
 	{ 0, 0 },
 };
 
+static struct sony_nc_event sony_FW_events[] = {
+	{ 0x82, SONYPI_EVENT_FNKEY_F2 },
+	{ 0x02, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x85, SONYPI_EVENT_FNKEY_F5 },
+	{ 0x05, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x86, SONYPI_EVENT_FNKEY_F6 },
+	{ 0x06, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x87, SONYPI_EVENT_FNKEY_F7 },
+	{ 0x07, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x89, SONYPI_EVENT_FNKEY_F9 },
+	{ 0x09, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x8A, SONYPI_EVENT_FNKEY_F10 },
+	{ 0x0A, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x8C, SONYPI_EVENT_FNKEY_F12 },
+	{ 0x0C, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x90, SONYPI_EVENT_PKEY_P1 },
+	{ 0x10, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0xA1, SONYPI_EVENT_PKEY_P2 },
+	{ 0x21, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0, 0 },
+};
+
 /* SNC-only model map */
 static const struct dmi_system_id sony_nc_ids[] = {
 		{
@@ -889,6 +911,15 @@ static const struct dmi_system_id sony_nc_ids[] = {
 				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-N"),
 			},
 		},
+		{
+			.ident = "Sony Vaio FW Series",
+			.callback = sony_nc_C_enable,
+			.driver_data = sony_FW_events,
+			.matches = {
+				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW"),
+			},
+		},
 		{ }
 };
 
-- 
1.6.1.2.419.g0d87e





More information about the kernel-team mailing list