mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hector Martin <marcan@marcan.st>
To: Sasha Finkelstein <fnkl.kernel@gmail.com>, Rob Herring <robh@kernel.org>
Cc: Sven Peter <sven@svenpeter.dev>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	- <asahi@lists.linux.dev>, Henrik Rydberg <rydberg@bitmath.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 1/4] dt-bindings: input: touchscreen: Add Z2 controller bindings.
Date: Tue, 28 Feb 2023 12:05:55 +0900	[thread overview]
Message-ID: <bb82ed53-3c90-69d2-1c92-d8a6f735fc5f@marcan.st> (raw)
In-Reply-To: <CAMT+MTTH-DC+1wMFUGNwVM3cYm0B+XVK7wL07khdy1hSjyhDGA@mail.gmail.com>

On 28/02/2023 07.25, Sasha Finkelstein wrote:
> On Mon, 27 Feb 2023 at 23:14, Rob Herring <robh@kernel.org> wrote:
>> I know little about libinput, but how would it know about
>> 'apple,z2-device-name'?
>>
> The idea was to forward the contents of this property
> into the input device name.

Then you want "label", as Rob said.

But I also agree with Rob that we want per-device compatibles, even if
we don't use them upfront in the driver. That's what we do everywhere
else, and it has served us well. I suggest this hierarchy:

compatible = "apple,j293-touchbar", "apple,z2-touchbar",
"apple,z2-multitouch";
label = "Apple J293 Touch Bar";

Then let's say a hypothetical touchscreen + touchbar MacBook comes out,
we end up with:

compatible = "apple,j789-touchbar", "apple,z2-touchbar",
"apple,z2-multitouch";
label = "Apple J789 Touch Bar";

compatible = "apple,j789-touchscreen", "apple,z2-touchscreen",
"apple,z2-multitouch";
label = "Apple J789 Touchscreen";

And it all is nicely future-proof. If libinput needs a hint other than
the device name to figure out what should be treated as a touchscreen or
not, the driver can use the "apple,z2-touchbar" vs
"apple,z2-touchscreen" distinction level for that. And if per-device
quirks are never necessary, we just ignore the model number compatible,
which is already what we do all over the place in other drivers (but the
day it becomes necessary, it's ready for us). And if it turns out we
don't need any of this for a while, the driver can just bind to
"apple,z2-multitouch" and call it a day.

- Hector

  reply	other threads:[~2023-02-28  3:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 10:20 [PATCH RFC 0/4] Driver for Apple Z2 touchscreens Sasha Finkelstein via B4 Relay
2023-02-24 10:20 ` [PATCH RFC 1/4] dt-bindings: input: touchscreen: Add Z2 controller bindings Sasha Finkelstein via B4 Relay
2023-02-24 10:55   ` Mark Kettenis
2023-02-24 11:04     ` Sasha Finkelstein
2023-02-24 11:08       ` Sven Peter
2023-02-28  2:58         ` Hector Martin
2023-02-28 20:53           ` Mark Kettenis
2023-03-01  3:13             ` Hector Martin
2023-02-24 11:03   ` Sven Peter
2023-02-24 11:08     ` Sasha Finkelstein
2023-02-27 22:23       ` Rob Herring
2023-02-27 19:51   ` Rob Herring
2023-02-27 20:06     ` Sasha Finkelstein
2023-02-27 22:14       ` Rob Herring
2023-02-27 22:25         ` Sasha Finkelstein
2023-02-28  3:05           ` Hector Martin [this message]
2023-02-24 10:20 ` [PATCH RFC 2/4] input: apple_z2: Add a driver for Apple Z2 touchscreens Sasha Finkelstein via B4 Relay
2023-03-09  3:04   ` Jeff LaBundy
2023-02-24 10:20 ` [PATCH RFC 3/4] arm64: dts: apple: t8103: Add touchbar bindings Sasha Finkelstein via B4 Relay
2023-02-24 10:20 ` [PATCH RFC 4/4] MAINTAINERS: Add entries for Apple Z2 touchscreen driver Sasha Finkelstein via B4 Relay
2023-02-28  2:43 ` [PATCH RFC 0/4] Driver for Apple Z2 touchscreens Hector Martin

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=bb82ed53-3c90-69d2-1c92-d8a6f735fc5f@marcan.st \
    --to=marcan@marcan.st \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fnkl.kernel@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=sven@svenpeter.dev \
    /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®