From patchwork Sat Dec 12 05:09:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattia Dongili X-Patchwork-Id: 66911 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBC5ACMT008740 for ; Sat, 12 Dec 2009 05:10:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758107AbZLLFKD (ORCPT ); Sat, 12 Dec 2009 00:10:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757838AbZLLFKD (ORCPT ); Sat, 12 Dec 2009 00:10:03 -0500 Received: from static-220-247-10-204.b-man.svips.gol.ne.jp ([220.247.10.204]:55345 "EHLO smtp.kamineko.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758107AbZLLFKB (ORCPT ); Sat, 12 Dec 2009 00:10:01 -0500 Received: by smtp.kamineko.org (Postfix, from userid 1004) id 18779742A4; Sat, 12 Dec 2009 14:10:08 +0900 (JST) Received: from caligola.kamineko.org (unknown [192.168.1.10]) by smtp.kamineko.org (Postfix) with ESMTP id 96AAB742AF; Sat, 12 Dec 2009 14:10:07 +0900 (JST) Received: by caligola.kamineko.org (Postfix, from userid 1000) id 93C7016128; Sat, 12 Dec 2009 14:10:07 +0900 (JST) From: Mattia Dongili To: Len Brown Cc: linux-acpi@vger.kernel.org, Mattia Dongili , "Matthew W. S. Bell" , Dmitry Torokhov Subject: [PATCH 1/2] sony-laptop: add AVMode key mapping Date: Sat, 12 Dec 2009 14:09:38 +0900 Message-Id: <1260594579-16027-2-git-send-email-malattia@linux.it> X-Mailer: git-send-email 1.6.5.4 In-Reply-To: <1260594579-16027-1-git-send-email-malattia@linux.it> References: <1260594579-16027-1-git-send-email-malattia@linux.it> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index a2a742c..9710f70 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -232,6 +232,7 @@ static int sony_laptop_input_index[] = { 56, /* 69 SONYPI_EVENT_VOLUME_INC_PRESSED */ 57, /* 70 SONYPI_EVENT_VOLUME_DEC_PRESSED */ -1, /* 71 SONYPI_EVENT_BRIGHTNESS_PRESSED */ + 58, /* 72 SONYPI_EVENT_MEDIA_PRESSED */ }; static int sony_laptop_input_keycode_map[] = { @@ -293,6 +294,7 @@ static int sony_laptop_input_keycode_map[] = { KEY_F15, /* 55 SONYPI_EVENT_SETTINGKEY_PRESSED */ KEY_VOLUMEUP, /* 56 SONYPI_EVENT_VOLUME_INC_PRESSED */ KEY_VOLUMEDOWN, /* 57 SONYPI_EVENT_VOLUME_DEC_PRESSED */ + KEY_MEDIA, /* 58 SONYPI_EVENT_MEDIA_PRESSED */ }; /* release buttons after a short delay if pressed */ @@ -890,6 +892,8 @@ static struct sony_nc_event sony_100_events[] = { { 0x0C, SONYPI_EVENT_FNKEY_RELEASED }, { 0x9f, SONYPI_EVENT_CD_EJECT_PRESSED }, { 0x1f, SONYPI_EVENT_ANYBUTTON_RELEASED }, + { 0xa1, SONYPI_EVENT_MEDIA_PRESSED }, + { 0x21, SONYPI_EVENT_ANYBUTTON_RELEASED }, { 0, 0 }, }; diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 34c4475..4f95c1a 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h @@ -111,6 +111,7 @@ #define SONYPI_EVENT_VOLUME_INC_PRESSED 69 #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 +#define SONYPI_EVENT_MEDIA_PRESSED 72 /* get/set brightness */ #define SONYPI_IOCGBRT _IOR('v', 0, __u8)