From: Caleb Connolly <caleb@connolly.tech>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
phone-devel@vger.kernel.org
Subject: Re: [PATCH 1/3] input: add event codes for user programmable switch events
Date: Mon, 15 Aug 2022 13:17:54 +0000 [thread overview]
Message-ID: <70be22f4-7851-200b-9741-4032033f7bfc@connolly.tech> (raw)
In-Reply-To: <YvQyOhgSGjQLHHvv@google.com>
On 10/08/2022 23:33, Dmitry Torokhov wrote:
> Hi Caleb,
>
> On Mon, May 16, 2022 at 02:22:57PM +0000, Caleb Connolly wrote:
>> Add SW_PROG{1,2,3,4} for device switches which are handled by userspace.
>>
>> This can be used for devices with "generic" switches which are intended
>> to be user-programmable, for example OnePlus phones contain a tri-state
>> key which can be used for switching between mute/vibrate/ring, or
>> programmed by the user to perform any arbitrary actions.
>>
>> These are analogous to the keys KEY_PROG{1,2,3,4} found on some
>> keyboards.
Hi Dmitry,
>
> This has been proposed a few times but this goes against the spirit of
> the input subsystem where each key or switch has a defined [default]
> purpose and userspace is normally expected to act upon input events
> without paying attention to what device they actually are coming from.
> IOW if you want to deal with particular GPIO signals you are better off
> using GPIO subsystem.
>
> In this context adding KEY_PROG1-4 was actually a mistake and we should
> try not extend it further.
>
> As fas as modeling the sliders with multiple settings goes I'd look into
> ABS events, probably ABS_MISC, with a set of values.
Ah I wasn't aware of ABS_MISC, this looks like a good way to go. Thanks.
>
> Thanks.
>
> --
> Dmitry
--
Kind Regards,
Caleb
prev parent reply other threads:[~2022-08-15 13:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 14:22 Caleb Connolly
2022-05-16 14:23 ` [PATCH 2/3] arm64: dts: qcom: sdm845-oneplus: add tri-state-key Caleb Connolly
2022-05-16 14:23 ` [PATCH 3/3] arm64: dts: qcom: msm8998-oneplus: " Caleb Connolly
2022-06-30 23:11 ` [PATCH 1/3] input: add event codes for user programmable switch events Bjorn Andersson
2022-08-07 16:01 ` Caleb Connolly
2022-08-10 22:33 ` Dmitry Torokhov
2022-08-15 13:17 ` Caleb Connolly [this message]
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=70be22f4-7851-200b-9741-4032033f7bfc@connolly.tech \
--to=caleb@connolly.tech \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@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
all inboxes | Powered by JetHome®