Linux-Devicetree Archive on lore.kernel.org
 help / color / Atom feed
From: Merlijn Wajer <merlijn@wizzup.org>
To: unlisted-recipients:; (no To-header on input)
Cc: pavel@ucw.cz, "Merlijn Wajer" <merlijn@wizzup.org>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Borislav Petkov" <bp@suse.de>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Mattias Jacobsson" <2pi@mok.nu>,
	"Mark Gross" <mgross@linux.intel.com>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	linux-omap@vger.kernel.org (open list:OMAP DEVICE TREE SUPPORT),
	devicetree@vger.kernel.org (open list:OMAP DEVICE TREE SUPPORT),
	linux-kernel@vger.kernel.org (open list),
	linux-input@vger.kernel.org (open list:INPUT (KEYBOARD, MOUSE,
	JOYSTICK , TOUCHSCREEN)...)
Subject: [PATCH 1/2] Input: add `SW_MACHINE_COVER`
Date: Fri, 12 Jun 2020 14:53:58 +0200
Message-ID: <20200612125402.18393-2-merlijn@wizzup.org> (raw)
In-Reply-To: <20200612125402.18393-1-merlijn@wizzup.org>

This event code represents the state of a removable cover of a device.
Value 0 means that the cover is open or removed, value 1 means that the
cover is closed.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
 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 0754b8d71262..8a84f11bf124 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -318,7 +318,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 b6a835d37826..0c2e27d28e0a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -888,7 +888,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 */
+#define SW_MAX			0x10
 #define SW_CNT			(SW_MAX+1)
 
 /*
-- 
2.24.1


  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 12:53 [PATCH 0/2] Add SW_MACHINE_COVER key Merlijn Wajer
2020-06-12 12:53 ` Merlijn Wajer [this message]
2020-06-16 10:50   ` [PATCH 1/2] Input: add `SW_MACHINE_COVER` Pavel Machek
2020-06-29 11:27     ` Merlijn Wajer
2020-06-29 13:36       ` input maintainer -- are you there? was " Pavel Machek
2020-06-30  5:22         ` Dmitry Torokhov
2020-06-30 17:58           ` Pavel Machek
2020-06-30 18:04             ` Tony Lindgren
2020-06-12 12:53 ` [PATCH 2/2] ARM: dts: n900: remove mmc1 card detect gpio Merlijn Wajer
2020-06-16 10:50 ` [PATCH 0/2] Add SW_MACHINE_COVER key Pavel Machek
2020-06-30 19:29 ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2020-02-15 17:02 Merlijn Wajer
2020-02-15 17:02 ` [PATCH 1/2] Input: add `SW_MACHINE_COVER` Merlijn Wajer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200612125402.18393-2-merlijn@wizzup.org \
    --to=merlijn@wizzup.org \
    --cc=2pi@mok.nu \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bcousson@baylibre.com \
    --cc=bp@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mgross@linux.intel.com \
    --cc=pavel@ucw.cz \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Devicetree Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-devicetree/0 linux-devicetree/git/0.git
	git clone --mirror https://lore.kernel.org/linux-devicetree/1 linux-devicetree/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-devicetree linux-devicetree/ https://lore.kernel.org/linux-devicetree \
		devicetree@vger.kernel.org
	public-inbox-index linux-devicetree

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-devicetree


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git