linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Caleb Connolly <caleb@connolly.tech>
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: Wed, 10 Aug 2022 15:33:30 -0700	[thread overview]
Message-ID: <YvQyOhgSGjQLHHvv@google.com> (raw)
In-Reply-To: <20220516142158.1612109-1-caleb@connolly.tech>

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.

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.

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2022-08-10 22:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 14:22 [PATCH 1/3] input: add event codes for user programmable switch events 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 [this message]
2022-08-15 13:17   ` Caleb Connolly

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=YvQyOhgSGjQLHHvv@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=caleb@connolly.tech \
    --cc=devicetree@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).