From: bgoswami@codeaurora.org
To: dmitry.torokhov@gmail.com
Cc: alsa-devel@alsa-project.org,
Banajit Goswami <bgoswami@codeaurora.org>,
plai@codeaurora.org, tiwai@suse.com, broonie@kernel.org,
srinivas.kandagatla@linaro.org, linux-input@vger.kernel.org,
Gopikrishnaiah Anandan <agopik@codeaurora.org>
Subject: [PATCH 2/3] input: Add SW_UNSUPPORT_INSERT define
Date: Fri, 24 May 2019 13:40:38 -0700 [thread overview]
Message-ID: <1558730438-16524-1-git-send-email-bgoswami@codeaurora.org> (raw)
From: Banajit Goswami <bgoswami@codeaurora.org>
Some devices may not support specific type of input devices. For example,
when a headset or extension cable with GND/MIC swap is plugged into a
headset jack that does not support the headset/cable, it needs to be
reported with a corresponding input event. Also, increase the max values
for INPUT_DEVICE_ID_SW_MAX and SW_MAX, to accommodate future extension of
the number of event.
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.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 448621c..7586099 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 0x1f
#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 85387c7..960fa86 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -808,7 +808,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_UNSUPPORT_INSERT 0x10 /* set = unsupported device inserted */
+#define SW_MAX 0x1f
#define SW_CNT (SW_MAX+1)
/*
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next reply other threads:[~2019-05-24 20:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 20:40 bgoswami [this message]
2019-08-22 18:16 ` [PATCH 2/3] input: Add SW_UNSUPPORT_INSERT define Dmitry Torokhov
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=1558730438-16524-1-git-send-email-bgoswami@codeaurora.org \
--to=bgoswami@codeaurora.org \
--cc=agopik@codeaurora.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=plai@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.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
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).