[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb82ed53-3c90-69d2-1c92-d8a6f735fc5f@marcan.st>
Date: Tue, 28 Feb 2023 12:05:55 +0900
From: Hector Martin <marcan@...can.st>
To: Sasha Finkelstein <fnkl.kernel@...il.com>,
Rob Herring <robh@...nel.org>
Cc: Sven Peter <sven@...npeter.dev>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
- <asahi@...ts.linux.dev>, Henrik Rydberg <rydberg@...math.org>,
linux-arm-kernel@...ts.infradead.org, linux-input@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 1/4] dt-bindings: input: touchscreen: Add Z2
controller bindings.
On 28/02/2023 07.25, Sasha Finkelstein wrote:
> On Mon, 27 Feb 2023 at 23:14, Rob Herring <robh@...nel.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
Powered by blists - more mailing lists