From patchwork Thu Nov 9 22:44:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Br=C3=BCns?= X-Patchwork-Id: 10052037 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 7BB1B60631 for ; Thu, 9 Nov 2017 22:45:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F9902AD8E for ; Thu, 9 Nov 2017 22:45:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6482F2B197; Thu, 9 Nov 2017 22:45:25 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 E20FE2B195 for ; Thu, 9 Nov 2017 22:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752588AbdKIWpG (ORCPT ); Thu, 9 Nov 2017 17:45:06 -0500 Received: from mail-out-1.itc.rwth-aachen.de ([134.130.5.46]:20038 "EHLO mail-out-1.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754543AbdKIWpA (ORCPT ); Thu, 9 Nov 2017 17:45:00 -0500 X-IronPort-AV: E=Sophos;i="5.44,371,1505772000"; d="scan'208";a="22965764" Received: from rwthex-w2-a.rwth-ad.de ([134.130.26.158]) by mail-in-1.itc.rwth-aachen.de with ESMTP; 09 Nov 2017 23:44:58 +0100 Received: from pebbles.fritz.box (78.49.52.200) by rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Thu, 9 Nov 2017 23:44:55 +0100 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: CC: , =?UTF-8?q?Stefan=20Br=C3=BCns?= , AceLan Kao , "Andy Shevchenko" , Darren Hart , Subject: [PATCH v2 5/5] platform/x86: intel-vbtn: support panel front button Date: Thu, 9 Nov 2017 23:44:36 +0100 X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171109224436.16472-1-stefan.bruens@rwth-aachen.de> References: <20171109224436.16472-1-stefan.bruens@rwth-aachen.de> MIME-Version: 1.0 X-Originating-IP: [78.49.52.200] X-ClientProxiedBy: rwthex-w2-b.rwth-ad.de (2002:8682:1a9f::8682:1a9f) To rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) Message-ID: <7c072721-1bd8-4921-b759-70bafb2ec894@rwthex-w2-a.rwth-ad.de> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Lenovo Helix 2 and Dell XPS 12 (9Q33) have an extra button on the front showing a 'Windows' logo, both reporting event codes 0xC2/0xC3 on press/release. On the Dell, both press/release are distinct events while on the Helix 2 both events are generated on release. Tested on XPS 12, for info on the Helix 2 see: https://www.spinics.net/lists/ibm-acpi-devel/msg03982.html Signed-off-by: Stefan BrĂ¼ns --- Changes in v2: - Emit KEY_LEFTMETA instead of KEY_MENU drivers/platform/x86/intel-vbtn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c index a484bcc6393b..0861efe490d0 100644 --- a/drivers/platform/x86/intel-vbtn.c +++ b/drivers/platform/x86/intel-vbtn.c @@ -38,6 +38,8 @@ static const struct acpi_device_id intel_vbtn_ids[] = { static const struct key_entry intel_vbtn_keymap[] = { { KE_KEY, 0xC0, { KEY_POWER } }, /* power key press */ { KE_IGNORE, 0xC1, { KEY_POWER } }, /* power key release */ + { KE_KEY, 0xC2, { KEY_LEFTMETA } }, /* 'Windows' key press */ + { KE_KEY, 0xC3, { KEY_LEFTMETA } }, /* 'Windows' key release */ { KE_KEY, 0xC4, { KEY_VOLUMEUP } }, /* volume-up key press */ { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */ { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */