From patchwork Wed Mar 14 00:32:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 10281297 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 66CE7601A0 for ; Wed, 14 Mar 2018 00:33:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45FBF285B5 for ; Wed, 14 Mar 2018 00:33:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A8E2285C8; Wed, 14 Mar 2018 00:33:03 +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 8469B285B5 for ; Wed, 14 Mar 2018 00:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932580AbeCNAdC (ORCPT ); Tue, 13 Mar 2018 20:33:02 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:42643 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932349AbeCNAdB (ORCPT ); Tue, 13 Mar 2018 20:33:01 -0400 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1evuLi-0002om-5f; Wed, 14 Mar 2018 00:32:58 +0000 From: Alex Hung To: alex.hung@canonical.com, jason.gerecke@wacom.com, dvhart@infradead.org, andy@infradead.org, platform-driver-x86@vger.kernel.org Subject: [PATCH] intel-hid: support KEY_ROTATE_LOCK_TOGGLE Date: Tue, 13 Mar 2018 17:32:56 -0700 Message-Id: <1520987576-22037-1-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 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 KEY_ROTATE_LOCK_TOGGLE is introduced in 4.16 rc1 and this key event is emitted on Wacom MobileStudio Pro 13. While here, clean up headers and sort headers alphabetically. Signed-off-by: Alex Hung Signed-off-by: Jason Gerecke --- drivers/platform/x86/intel-hid.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c index 5e3df194723e..b5adba227783 100644 --- a/drivers/platform/x86/intel-hid.c +++ b/drivers/platform/x86/intel-hid.c @@ -16,16 +16,14 @@ * */ +#include +#include +#include +#include #include #include -#include -#include #include -#include -#include #include -#include -#include MODULE_LICENSE("GPL"); MODULE_AUTHOR("Alex Hung"); @@ -67,8 +65,8 @@ static const struct key_entry intel_array_keymap[] = { { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* Release */ { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* Press */ { KE_IGNORE, 0xC7, { KEY_VOLUMEDOWN } }, /* Release */ - { KE_SW, 0xC8, { .sw = { SW_ROTATE_LOCK, 1 } } }, /* Press */ - { KE_SW, 0xC9, { .sw = { SW_ROTATE_LOCK, 0 } } }, /* Release */ + { KE_KEY, 0xC8, { KEY_ROTATE_LOCK_TOGGLE } }, /* Press */ + { KE_IGNORE, 0xC9, { KEY_ROTATE_LOCK_TOGGLE } }, /* Release */ { KE_KEY, 0xCE, { KEY_POWER } }, /* Press */ { KE_IGNORE, 0xCF, { KEY_POWER } }, /* Release */ { KE_END },