From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B07C35242 for ; Fri, 14 Feb 2020 19:24:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07FE120848 for ; Fri, 14 Feb 2020 19:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388006AbgBNTYT (ORCPT ); Fri, 14 Feb 2020 14:24:19 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:38744 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729320AbgBNTYT (ORCPT ); Fri, 14 Feb 2020 14:24:19 -0500 X-Greylist: delayed 459 seconds by postgrey-1.27 at vger.kernel.org; Fri, 14 Feb 2020 14:24:17 EST Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23994981AbgBNTQgVDTwM (ORCPT + 3 others); Fri, 14 Feb 2020 20:16:36 +0100 Date: Fri, 14 Feb 2020 20:16:34 +0100 From: Ladislav Michl To: Merlijn Wajer Cc: =?iso-8859-2?Q?Beno=EEt?= Cousson , Tony Lindgren , Rob Herring , Mark Rutland , Dmitry Torokhov , Mattias Jacobsson <2pi@mok.nu>, "Darren Hart (VMware)" , linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [RFC PATCH 1/2] Input: add `SW_MACHINE_COVER` Message-ID: <20200214191634.GA6251@lenoch> References: <20200214130249.6845-1-merlijn@wizzup.org> <20200214130249.6845-2-merlijn@wizzup.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200214130249.6845-2-merlijn@wizzup.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Merlijn, On Fri, Feb 14, 2020 at 02:02:47PM +0100, Merlijn Wajer wrote: > This event code represents the state of a removable cover of a device. > Value 1 means that the cover is open or removed, value 0 means that the > cover is closed. > > This can be used to preempt users removing a removable mmc card or even > the battery, allowing userspace to attempt to safely unmount a card. > --- > include/linux/mod_devicetable.h | 2 +- > include/uapi/linux/input-event-codes.h | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h > index 448621c32e4d..4c692cb3cc1d 100644 > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -299,7 +299,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 0x0f > +#define INPUT_DEVICE_ID_SW_MAX 0x10 > #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 64cee116928e..318a6387cdfb 100644 > --- a/include/uapi/linux/input-event-codes.h > +++ b/include/uapi/linux/input-event-codes.h > @@ -807,7 +807,8 @@ > #define SW_LINEIN_INSERT 0x0d /* set = inserted */ > #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ > #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ > -#define SW_MAX 0x0f > +#define SW_MACHINE_COVER 0x10 /* set = cover closed */ There is an extra space above ^ > +#define SW_MAX 0x10 > #define SW_CNT (SW_MAX+1) > > /* > -- > 2.23.0