From patchwork Tue Jun 7 23:32:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 9162843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58D6960467 for ; Tue, 7 Jun 2016 23:34:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49DC12835C for ; Tue, 7 Jun 2016 23:34:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E9342836D; Tue, 7 Jun 2016 23:34:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7C822835C for ; Tue, 7 Jun 2016 23:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932490AbcFGXcz (ORCPT ); Tue, 7 Jun 2016 19:32:55 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33177 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932476AbcFGXcx (ORCPT ); Tue, 7 Jun 2016 19:32:53 -0400 Received: by mail-wm0-f68.google.com with SMTP id r5so9626343wmr.0; Tue, 07 Jun 2016 16:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ClA5aeGTfMWCSoNyTKf+qqg5lE13kSRHG/0fkYUBplA=; b=TfVXh6UO3El8SH1qtiYo8TNgDfVBY4cHddQCWWyfiaMy2QDMNNATGuWQXYRff1WLHO twCBURZa6KoczQ59oDf/S4IRAQafa6LFTkcMJZ6ok7NGDKg4Rmy4bDG9PI9o8D3NUde4 MWN8mAaBAqzHynwO8TGmO1VcKwiKgjvIqUxcnFDZ0T29JMmWNB/UbxdNRWPHTOedhm31 BS1xuxE8BpIYV82SDaZVOp7A920aAVv/3JnX9OaoHNAQY53xpqKHggOWDtNvUA/7UnQy Y3GGA1TTXvt/Fcsx/Ia01WzLM9SWFFiV2QjGbNMSS/+yRFcqZX1O+V/fS0ybJmrWsyH2 NtGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ClA5aeGTfMWCSoNyTKf+qqg5lE13kSRHG/0fkYUBplA=; b=VfAKXQssV4+4Pix1/pnZrkJj8+fCG5YVwIRDQcAOaBXTXS89BFPTBr2BoN/7Dsoboo 4+hBMz1PdVq23QaGqwLJSnVIT+a2hrRrJnMCxmt85iGyd0EOzD9kSeVeUOu7MavRROUw d6SJ6CNpaiCLj8QAPV5CWhXlmZIb4M3CL6Em7933TF5zCQ7ZHwrX4ntY2Y3j9b8M/mpK UyZOjP0aXpftVSUnMo6zdEXhRiC57M0s1Vh/LjBFxMYL98GCnXN2Lo4G9h2Grt0lLL36 /SjGRWYl6oFFM1OLsYIxOEH0unXdO7eM1lNn7pYsD8Kj4mkBE/MHoZV4+mchVPXcEk6A n0GQ== X-Gm-Message-State: ALyK8tK6nT8BybUCbDqrTH6aIpkt7M6RwYyRnSamoY/wA+dJW09sj2KihnteAisndXLuQw== X-Received: by 10.28.226.133 with SMTP id z127mr1834563wmg.98.1465342368211; Tue, 07 Jun 2016 16:32:48 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id d195sm21742155wmd.12.2016.06.07.16.32.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 16:32:47 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Matthew Garrett , Darren Hart , Gabriele Mazzotta , =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Cc: Mario Limonciello , Andy Lutomirski , Alex Hung , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2 2/4] dell-wmi: Sort WMI event codes and update comments Date: Wed, 8 Jun 2016 01:32:25 +0200 Message-Id: <1465342347-20635-3-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1465342347-20635-1-git-send-email-pali.rohar@gmail.com> References: <1465342347-20635-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pali Rohár Tested-by: Michał Kępień --- drivers/platform/x86/dell-wmi.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 4d23c91..6750604 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -88,29 +88,29 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = { static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, - { KE_KEY, 0xe009, { KEY_EJECTCD } }, - - /* These also contain the brightness level at offset 6 */ - { KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } }, - { KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } }, + /* Key code is followed by brightness level */ + { KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } }, + { KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } }, /* Battery health status button */ - { KE_KEY, 0xe007, { KEY_BATTERY } }, + { KE_KEY, 0xe007, { KEY_BATTERY } }, - /* Radio devices state change */ + /* Radio devices state change, key code is followed by additional information */ { KE_IGNORE, 0xe008, { KEY_RFKILL } }, - /* The next device is at offset 6, the active devices are at - offset 8 and the attached devices at offset 10 */ - { KE_KEY, 0xe00b, { KEY_SWITCHVIDEOMODE } }, + { KE_KEY, 0xe009, { KEY_EJECTCD } }, + + /* Key code is followed by: next device, active devices, attached devices */ + { KE_KEY, 0xe00b, { KEY_SWITCHVIDEOMODE } }, + /* Key code is followed by keyboard illumination level */ { KE_IGNORE, 0xe00c, { KEY_KBDILLUMTOGGLE } }, /* BIOS error detected */ { KE_IGNORE, 0xe00d, { KEY_RESERVED } }, /* Wifi Catcher */ - { KE_KEY, 0xe011, {KEY_PROG2 } }, + { KE_KEY, 0xe011, { KEY_PROG2 } }, /* Ambient light sensor toggle */ { KE_IGNORE, 0xe013, { KEY_RESERVED } }, @@ -118,12 +118,14 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { { KE_IGNORE, 0xe020, { KEY_MUTE } }, /* Dell Instant Launch key */ - { KE_KEY, 0xe025, { KEY_PROG4 } }, - { KE_KEY, 0xe029, { KEY_PROG4 } }, + { KE_KEY, 0xe025, { KEY_PROG4 } }, /* Audio panel key */ { KE_IGNORE, 0xe026, { KEY_RESERVED } }, + /* Dell Instant Launch key */ + { KE_KEY, 0xe029, { KEY_PROG4 } }, + { KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } }, { KE_IGNORE, 0xe030, { KEY_VOLUMEUP } }, { KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } }, @@ -146,6 +148,7 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { { KE_IGNORE, 0xe0f7, { KEY_MUTE } }, { KE_IGNORE, 0xe0f8, { KEY_VOLUMEDOWN } }, { KE_IGNORE, 0xe0f9, { KEY_VOLUMEUP } }, + { KE_END, 0 } };