From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD46E31AF09 for ; Tue, 6 Jan 2026 11:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767697286; cv=none; b=dmO7N4uQGyjdjjXscCjhOj9Rdg078GOPxSV1vNciYDKMjGej4+I/x1hB+WwMeoBgvOT9E8gX39nNKUi6zquxwZFrTIAxHVFKfc+36ub1BmLc5oPfIcGdGEVNY+GyeeqXNOmLXgMmZ8Sq2wEAJy3+JVwBgxdd2he/yVJQBYwrgyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767697286; c=relaxed/simple; bh=K8B1ITgIq3FUq81iGq9UYGee0jVJIvlcDFoY0m6i980=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q/BFL6YsBUXsYnbEbmTaWADaMM0S4ZDUvxuHOPZ2V/pwRjgVnSlhFfS7lwcfzIu6pxWO3fFXRl8wnf2utuUkM87HPIMKljzU1dxGXCJAIa5+SL6vJaPt0ckt/unr8MAqpTC+xKrQbgk71VqX3Ux27FI8fHcehyvImuWV6T2q/zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=nZRv1uO3; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="nZRv1uO3" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-42fbad1fa90so658817f8f.0 for ; Tue, 06 Jan 2026 03:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1767697282; x=1768302082; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=O3m/v4VXTV6NMfNLvVjfAE6l9ij7+j/SxZwfjGUHi2c=; b=nZRv1uO3zkmd8QC5Vlihl4uoydpF7fR9m2RAkVFjUx9Xdj7uKX2uRSXip1oGOs+YGv wpbkvTFeG5xOJQb6GuGWeTLH/pSHdY+bHbRoI3VTCjJAvL9fHnOqiR49oT+w5qU7Lctn g5nkdyErB7GxgqhPSz0YLcQeFjkdfIVqKuvI4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767697282; x=1768302082; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=O3m/v4VXTV6NMfNLvVjfAE6l9ij7+j/SxZwfjGUHi2c=; b=h6gMQIxnqweX/6a7g5ULK+ejXhMIPE/+khjGGSct1qcXzRM7gvPJX8iMXbfB37FwAu l0rutqkoCf9VQv3BQ+KbGcb5h96RCiXvWTCZlqmAhDDeQ1D2hhJcWQV9WPN1j0np0MuH 8kOsCiKkPnMkKTWGrrj+GkkUDMXQHLV1RKEN3zCq5gUiepne6aIvBT0apQ0b7DoRn+6f lSmvD/8m5V/Z44NsaPfuZgXmCt5AJACGGQj85WUVlTjY+7QXxQ9znWBE3iYp+b2JaSo8 b937ehZQmt0MkVoyznOL7KU3UBq9vrmq4FtSW88jtj2F6GDc2ja81EXgXOtenb2j5xsE od6A== X-Forwarded-Encrypted: i=1; AJvYcCU7w5O9hN14H1Dncmnqw1AdvFYu98lXIZ7tfRJzfwVSEWrZjIlbi6HJ72gX4Lg+WluiYdtHsUUlc6LZZx0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+jC6F+sIy5lB5Pe/LOoaGGrxn7g2XExFM4oL7Z0kuaoU/9+jd NzWfVf0BnfC9bxZDINbsEcSlXrTfIKh4xDLrW5/+mHiFhsbvPsUQvXw9J0gDctJ7Og== X-Gm-Gg: AY/fxX7mUyWY02rCqJzI+xb6z1YWcf3r8b7+ZI5nnEyUvDdaLpW/pQOtz/BFxdt0xCf RMpOt87CbZCxZok/mVWRbxjTXBXNPpnpSAtRfSML02rssKyJHGwSu36QE2de5uDzt0WtB3Nk9jK Qj4rSycOX8oU94l1dHl1CkB6jM3rFVo0ossB89q93saQhvF3SxndyUgdK1m0hjWyQIN8LyjKRLQ zqdvf+BpO+ZDBZ4Lsay4vNv/8uBQQ6v0ZalgzkKUhzOTXrnWt+5t166LAiOroZnJquE2hCXzmSo UhZkwM6Q8iCTheIuLpgKbxq4kldp5kRMU+qnJfpDRh/BOGHcCMknX2qiI/LefQs8nwAWXpeTBgf poWOCJrjJ8sfYul7IlC7wrI6D8I3WpnaghZAOVQh09AU4k400M5hDD5ZnFgwn1aZT54FLRu26sd Xprk7+0LHt7iwyNzlrDA== X-Google-Smtp-Source: AGHT+IG9g5Uruo7F3IpKCSwx4dA/EzxEcppJATTbysJnloBLnkO2XLfNlAmhjuyITGfSxfeZpj0FHw== X-Received: by 2002:a05:6000:2c12:b0:430:f9c2:8500 with SMTP id ffacd0b85a97d-432bc9fc09emr2909739f8f.43.1767697281958; Tue, 06 Jan 2026 03:01:21 -0800 (PST) Received: from google.com ([37.228.206.31]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0e16d2sm4050362f8f.13.2026.01.06.03.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 03:01:21 -0800 (PST) Date: Tue, 6 Jan 2026 11:01:19 +0000 From: Fabio Baltieri To: Krzysztof Kozlowski Cc: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Benson Leung , Guenter Roeck , Tzung-Bi Shih , Simon Glass , linux-input@vger.kernel.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] dt-bindings: google,cros-ec-keyb: add has-fn-map prop Message-ID: References: <20251231143538.37483-1-fabiobaltieri@chromium.org> <20251231143538.37483-2-fabiobaltieri@chromium.org> <20260105-helpful-ocelot-of-eternity-6bb1ee@quoll> <20260106-oryx-of-major-protection-10c4e3@quoll> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260106-oryx-of-major-protection-10c4e3@quoll> On Tue, Jan 06, 2026 at 08:27:10AM +0100, Krzysztof Kozlowski wrote: > 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 > > > > --- > > > > .../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? > Think I answered that, it felt like a clarer design to me. Anyway I got the message will send a v4 with runtime detection, it's certainly a valid option and works out for me.