[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260106-oryx-of-major-protection-10c4e3@quoll>
Date: Tue, 6 Jan 2026 08:27:10 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Fabio Baltieri <fabiobaltieri@...omium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>, Tzung-Bi Shih <tzungbi@...nel.org>,
Simon Glass <sjg@...omium.org>, linux-input@...r.kernel.org, devicetree@...r.kernel.org,
chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: google,cros-ec-keyb: add has-fn-map
prop
On Mon, Jan 05, 2026 at 10:55:51AM +0000, Fabio Baltieri wrote:
> On Mon, Jan 05, 2026 at 08:52:56AM +0100, Krzysztof Kozlowski wrote:
> > On Wed, Dec 31, 2025 at 02:35:37PM +0000, Fabio Baltieri wrote:
> > > Add binding documentation for the has-fn-map property.
> > >
> > > Signed-off-by: Fabio Baltieri <fabiobaltieri@...omium.org>
> > > ---
> > > .../devicetree/bindings/input/google,cros-ec-keyb.yaml | 8 ++++++++
> > > 1 file changed, 8 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
> > > index fefaaf46a240..fa24b1cbc788 100644
> > > --- a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
> > > +++ b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml
> > > @@ -44,6 +44,14 @@ properties:
> > > where the lower 16 bits are reserved. This property is specified only
> > > when the keyboard has a custom design for the top row keys.
> > >
> > > + google,has-fn-map:
> > > + description: |
> > > + The keymap has function key layer. This allows defining an extra set of
> > > + codes that are sent if a key is pressed while the KEY_FN is held pressed
> > > + as well. The function codes have to be defined in the linux,keymap
> > > + property with an offset of keypad,num-rows from the normal ones.
> > > + type: boolean
> >
> > You still did not answer to my previous question, why this is not
> > deducible from the key map (presence of KEY_FN in the map).
>
> The driver behaves differently with the fn layer is present, has to make
> extra space for the extra codes and enable the logic to use it. I can
> certainly detect it in runtime, would have to always allocate the extra
> space even if not needed and check not only that there is an FN key but
> if there's anything in the second half of the map.
>
> I'm not overly enthusiastic about it, it's a bit wasteful on memory
> (probably no big deal, half a kb of RAM I guess) and somewhat less
> defensive to misconfigurations and in general I don't like the new logic
> to be enabled magically, as a side effect. It'd be extra complexity for
> the sake of saving one boolean property, but sure if you think that's
> the way to go then I guess I can implement it that way.
Driver logic is not an argument here, we don't care about it. You should
answer why presence of google,has-fn-map in DT makes sense when none of
the keymaps has KEY_FN. Why this is a valid and desired configuration?
Best regards,
Krzysztof
Powered by blists - more mailing lists