From patchwork Tue Oct 20 00:15:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Pearson X-Patchwork-Id: 11845509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50A3A14B7 for ; Tue, 20 Oct 2020 00:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A7902242C for ; Tue, 20 Oct 2020 00:16:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389311AbgJTAQ3 (ORCPT ); Mon, 19 Oct 2020 20:16:29 -0400 Received: from mail1.bemta24.messagelabs.com ([67.219.250.4]:12194 "EHLO mail1.bemta24.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727220AbgJTAQ3 (ORCPT ); Mon, 19 Oct 2020 20:16:29 -0400 Received: from [100.112.128.224] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-4.bemta.az-a.us-west-2.aws.symcld.net id 96/23-21904-A5C2E8F5; Tue, 20 Oct 2020 00:16:26 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupileJIrShJLcpLzFFi42LJePGQVzdKpy/ e4NxuJYtD5w4wWxxe9ILR4uu32+wWb45PZ7I4c3shk8XNT99YLVbvecHswO4xq6GXzWPnrLvs Hr+2rWHxWH5wGpPH+31X2Tw+b5ILYItizcxLyq9IYM2Y2reHsWAGT8WhiduZGhgPcnUxcnEIC fxnlJj3/xsbhPOGUeLW+oOMXYycHGwC2hJbtvwCSnBwiAjISHxY6wlSwyxwm1Hi+a4GNpAaYY FwiTXbm9hBbBYBVYmDJ7uZQWxeARuJ/69awGokBOQlnvYuB4tzAtWc6XrMAmILCahI3H+whA2 iXlDi5MwnYHFmoPrmrbOZIWwJiYMvXjBDzFGQeDv3PtTMBIllL+8wT2AUmIWkfRaS9llI2hcw Mq9itEgqykzPKMlNzMzRNTQw0DU0NNI1NLLQNbQw10us0k3UKy3WLU8tLtE10kssL9YrrsxNz knRy0st2cQIjJaUgobdOxhfvv6gd4hRkoNJSZR3i3pfvBBfUn5KZUZicUZ8UWlOavEhRhkODi UJXmltoJxgUWp6akVaZg4wcmHSEhw8SiK8OVpAad7igsTc4sx0iNQpRl2OnUfnLWIWYsnLz0u VEuf1B5khAFKUUZoHNwKWRC4xykoJ8zIyMDAI8RSkFuVmlqDKv2IU52BUEuY9DrKKJzOvBG7T K6AjmICOsO3vATmiJBEhJdXAZG984OzEwM0N5/bMnq54j/n64aW+byR4l6RLlRySDVrhd+XX3 Jzz+4xfC71bdd+Ck1cw9N2SQ0z5WokGC/5LFN/xFNBNVuCU8vG23baP2f9Vv3fbdufVDfbPNW Z/XdhR/H27b+yudy7deoJGr+07L4splR4Q+H/jVew8Dsu+qvn+nZ8mSHIaFillrz2klHqwu69 /78kJtz3EwzOzQnJvVOW8mmbFHvzb1udZ347rHldYkix/enwJ3aR2+cDnVm/hoNOL2sR2XLQt PTxrU3nzvSel75bK3J+6fXahxwuP0PZljgVW7HV6836KyN8RC7m6u6g/8PbMXYtiDpWyf1Lb0 Mwc/3Iyg/hCJ5Udt6bUKrEUZyQaajEXFScCABxSaJqdAwAA X-Env-Sender: markpearson@lenovo.com X-Msg-Ref: server-24.tower-336.messagelabs.com!1603152985!159925!1 X-Originating-IP: [104.232.225.13] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.60.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28762 invoked from network); 20 Oct 2020 00:16:26 -0000 Received: from unknown (HELO lenovo.com) (104.232.225.13) by server-24.tower-336.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 20 Oct 2020 00:16:26 -0000 Received: from reswpmail04.lenovo.com (unknown [10.62.32.23]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by Forcepoint Email with ESMTPS id 0F10044CF7B9B7A9F62B; Mon, 19 Oct 2020 20:16:25 -0400 (EDT) Received: from localhost.localdomain.com (10.64.93.219) by reswpmail04.lenovo.com (10.62.32.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2044.4; Mon, 19 Oct 2020 17:16:22 -0700 From: Mark Pearson To: CC: , , , , , , , Subject: [PATCH v2 1/3] Input: add event codes for lap and palmreset proximity switches Date: Mon, 19 Oct 2020 20:15:54 -0400 Message-ID: <20201020001556.388099-1-markpearson@lenovo.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.64.93.219] X-ClientProxiedBy: reswpmail04.lenovo.com (10.62.32.23) To reswpmail04.lenovo.com (10.62.32.23) Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Add infrastructure needed to support lap and palmrest proximity sensors. These sensors are used for identifying thermal mode changes and modifying WWAN transmitter power. Signed-off-by: Mark Pearson --- include/linux/mod_devicetable.h | 2 +- include/uapi/linux/input-event-codes.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 5b08a473cdba..897f5a3e7721 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -320,7 +320,7 @@ struct pcmcia_device_id { #define INPUT_DEVICE_ID_LED_MAX 0x0f #define INPUT_DEVICE_ID_SND_MAX 0x07 #define INPUT_DEVICE_ID_FF_MAX 0x7f -#define INPUT_DEVICE_ID_SW_MAX 0x10 +#define INPUT_DEVICE_ID_SW_MAX 0x12 #define INPUT_DEVICE_ID_PROP_MAX 0x1f #define INPUT_DEVICE_ID_MATCH_BUS 1 diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 0c2e27d28e0a..26f71a9a6936 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -889,7 +889,9 @@ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_MACHINE_COVER 0x10 /* set = cover closed */ -#define SW_MAX 0x10 +#define SW_LAP_PROXIMITY 0x11 /* set = lap proximity sensor active */ +#define SW_PALMREST_PROXIMITY 0x12 /* set = palmrest proximity sensor active */ +#define SW_MAX 0x12 #define SW_CNT (SW_MAX+1) /*