Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2099044ybv; Fri, 14 Feb 2020 11:25:55 -0800 (PST) X-Google-Smtp-Source: APXvYqy7k9R77jjSxf78xjNIj5R4ns49FqqW/8oaRHS4KRpwK2zAGdRuTQOgyn7en9NJQNJHnPcB X-Received: by 2002:a05:6830:1d7a:: with SMTP id l26mr3419976oti.138.1581708355251; Fri, 14 Feb 2020 11:25:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581708355; cv=none; d=google.com; s=arc-20160816; b=udV5tb8kBmhjgconKbqBo6El0MJpr6bsPn2fLtMyOleoAAJWET0KdRFgxXk+0XWGIB +nfjTVjBGTHzm4nXs8iHMueV9ypahyU1e4WXYlMIDmsXw6diTWjFUpmGaq3bSUCKgDI+ Vf7uobmtw0eqdiOOsOCsaqG9x530PQVF+GOL8kcX31pm6nisRrwJGVTDHHTMuME69SC1 3Dyc84eztG4ZZgivKlZBjFR3XvGXlIYl8go91LWZ1qRRlqBsW9+fh9YXCw31H8xCwX/2 dVdj6JCagubngSogQhcaok3b4xF387pv3WbHKthqL7svJe+mcHoCn95AuJk2rkZ2FwOH +5gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fXtPXilRd7gFjaKXabP9Xy+lcie5ZXbWNmJs1qq+Jyc=; b=HxNMe2GS/yisW9OOQdC8MteGzbFo5tF9KwzKvxQW212BqmaHB69jL77xRJU1sG6A+t re4PfQpk+tOMsz5/KyJ62tzvPcsUD0Qqtqg9lHe8URq1eQoPq7BUG7/+DgZLFtGjaRO4 pqgOEWikwh57O55SABh+WFEIQ3f0EU+3aRau3hyPibywdUEWEnVd8SVJW1V5EP8bUZyo ABl0xsAwNkQiOFzFdUbzokvfNsO+vBmdMbd8nCVHaGY9ieStWzEKUOcDyqWL716XX//k R7i5tY4Ui7E0R68hpZlmzv4/ifu+a9Z1vDL6SothABqGp+/RURbeTk8AKwHZzTHHbRKY zcHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si3270278otm.263.2020.02.14.11.25.43; Fri, 14 Feb 2020 11:25:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388256AbgBNTYT (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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