From: Mark Pearson <markpearson@lenovo.com>
To: <markpearson@lenovo.com>
Cc: <njoshi1@lenovo.com>, <hdegoede@redhat.com>,
<dmitry.torokhov@gmail.com>,
<platform-driver-x86@vger.kernel.org>,
<linux-input@vger.kernel.org>, <jeff@labundy.com>,
<anthony.wong@canonical.com>, <hadess@hadess.net>
Subject: [PATCH 1/3] Adding event codes for Lenovo lap and palm sensors
Date: Thu, 15 Oct 2020 09:57:15 -0400 [thread overview]
Message-ID: <20201015135717.384610-2-markpearson@lenovo.com> (raw)
In-Reply-To: <20201015135717.384610-1-markpearson@lenovo.com>
These sensors are used for thermal mode changes and modifying WWAN
transmitter power.
Signed-off-by: Nitin Joshi <njoshi1@lenovo.com>
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
---
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)
/*
--
2.28.0
next prev parent reply other threads:[~2020-10-15 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 13:57 [PATCH 0/3] Lenovo lap and palm sensor support Mark Pearson
2020-10-15 13:57 ` Mark Pearson [this message]
2020-10-15 13:57 ` [PATCH 2/3] Add support for Lenovo palm sensor Mark Pearson
2020-10-15 13:57 ` [PATCH 3/3] Add support for Lenovo lap sensor Mark Pearson
2020-10-19 18:49 ` [PATCH 0/3] Lenovo lap and palm sensor support Hans de Goede
2020-10-20 0:15 ` [External] " Mark Pearson
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=20201015135717.384610-2-markpearson@lenovo.com \
--to=markpearson@lenovo.com \
--cc=anthony.wong@canonical.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=hdegoede@redhat.com \
--cc=jeff@labundy.com \
--cc=linux-input@vger.kernel.org \
--cc=njoshi1@lenovo.com \
--cc=platform-driver-x86@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).