From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (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 CC2CA3064A0 for ; Mon, 9 Feb 2026 19:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770666804; cv=none; b=qTBzUkPF/wyY2SQfGiv+m7SIBXuQRyb7j7xOJ1DWAgk0+e8biyGh1By43LFlsw2UVXAIRKl1du0UIPqupJvzxDDO23SyxydZg5zR72Ff3YKsD1XAkWNpMh5U4/G9mS//stlLFzCSNwLtC86hfno+Q+KmilNaM0Aj2luZigMdxRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770666804; c=relaxed/simple; bh=qsOoJypqm6WAX+ButUfaboUhpaZ54vhFpFpfnB48kCE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N2u4bKS2zwQsuzgCGrXVXm8p2RO1bifmsUBtbucLn1ZAEMoJLJpQ2orPhg/fAlBhMJCNs5hkB4XKIAiOuNltAJ/sfSycIRIxvKGHx0YlUJr7NouC3SYgwI0joyq2xV+S71GP5Zg5C893s2mc8dRk9cOhOzHyBf613Oes59pnRbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=f6YKmwQv; arc=none smtp.client-ip=74.125.82.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f6YKmwQv" Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-2b785801c93so8382910eec.0 for ; Mon, 09 Feb 2026 11:53:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770666804; x=1771271604; 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=BwydA4iUO74qwBfrwUHAcE351+AL9tRs2Ti2OZrDnSI=; b=f6YKmwQvSesbnZPs6YxRWF6q2cR8A2629BMg5kOpJqs1tEUmyX2ncchVWCeFB7naJq ava9OcIRovOrUY0P5238QfPnEbWpU/WuDGITP7bdv0mlDXFPvRjWAqG4kPjJYtaeRb2c 1tAKji+FWHL1cfkKYYQc2AOkkPe9+ybMrVqLr5gqetmmUzpXQkqlLpdbIfScpejAdBAT fxyasMNRPK9KCXHguzocfNnehet6PylmIluQ966sAI8NybnsMD7rjzd4okQL8YaayLmb RskQ+XTAU+MziDnUy8p52/nlx5dlwax5xrxX5id6oy7HopNwK+QdeYSpE1XVhV/troGV GRCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770666804; x=1771271604; 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=BwydA4iUO74qwBfrwUHAcE351+AL9tRs2Ti2OZrDnSI=; b=S7QRfPV8vyHFu7FYJILRumtolYWielcgJJwSaDWrrvYFwMWqcOQNy6C9w+enwDqQFW /5JNJvBFjmqjy3k+Qij6vH1OfPsw0dO3bxIEBlR4iaK2JK44+ayWqyiTSlUynVQ5T6w/ Db6jQRbk7DULtgEGDjKlI+Tk82VoF6OLMqNgaUuZp0SfD8j1dd4lB2sHt5BUZNoeXq7I PwruLDLp0jlu7uCvi8sBblcbT2jm1o2gIVva5XdGvuV1gakt4GDakzV8+Pu8WsbQcbLF ixECCg756PoOo8Ti7grAckTL09+yZGY+veuacbL0RTk8husCbRd4ZQp+1MphgF7Y0Kge HJig== X-Forwarded-Encrypted: i=1; AJvYcCWc79UGGu3DYF3UjG0AZLDFLghHgdl73ReZEgu/BVIeFZCy+Nba4LMUB72H374WsJKtQ4HPvG6+cyItb8g=@vger.kernel.org X-Gm-Message-State: AOJu0YyeffIIoY5UYlv8Wt/ic1nXa0/o4oWZqQ52BDIWAxKcZM6YSGZj k+6lBL6XtxgcsGNp4lPgoHrXAMKUTC32KzLeW7VrF1eDKcT0m3U9nIfm X-Gm-Gg: AZuq6aKhcirWn18hCyP4eBaco2YtNtyS94SuLddMI6u3JSUStG0y9A3nulhW54sGTp8 8hlsgqqqweBEDLUt6UuzZzbeqhleDfbnUivTCvBwi/t+e4s9grdlEGn0klMdBlbYUqXGD84VkLm 5cwy56cHAij62zK4HMf9K3ZNw9hjOCoXNPchpp7a38bv9tubxduw/WJIJIJjn6PExikV9sbYZ1Y kldAvSdqGORolMf0MMnwB1Euads+CktXbChu3vCJ8zlQVtmsFJXEL7axWnsKrIvUyQ+9uxVUyHF 0I29twTztJQbMiAKDkHXvtZLo4hpVDbLDbRAwAIs74QBy4ykHClXrEQgId6r5f+2g1D0U35wdDP LjW0HnUyExxyaz0ZuzKpgRX/svn+lpd8ejnvfqwpRrYDjQ1YrJIzdDAGbcvceWpUUvVinOX25wq dmh/NeE6a0IUoqTmRNB7sspITmhmJ3a0He7ZE5PfLoH0UqRQucZ9Nd X-Received: by 2002:a05:7301:3d0d:b0:2b6:ffb9:9633 with SMTP id 5a478bee46e88-2b8564a69a5mr5511786eec.15.1770666803737; Mon, 09 Feb 2026 11:53:23 -0800 (PST) Received: from google.com ([2a00:79e0:2ebe:8:616e:78a2:cc03:4be3]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b855c89695sm8073859eec.31.2026.02.09.11.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 11:53:23 -0800 (PST) Date: Mon, 9 Feb 2026 11:53:17 -0800 From: Dmitry Torokhov To: Fabio Baltieri Cc: Benson Leung , Guenter Roeck , Tzung-Bi Shih , Simon Glass , linux-input@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/1] Input: cros_ec_keyb - add function key support Message-ID: References: <20260112093309.240905-1-fabiobaltieri@chromium.org> <20260112093309.240905-2-fabiobaltieri@chromium.org> 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: On Mon, Feb 09, 2026 at 07:33:05PM +0000, Fabio Baltieri wrote: > On Mon, Feb 09, 2026 at 10:20:52AM -0800, Dmitry Torokhov wrote: > > On Mon, Feb 09, 2026 at 03:46:20PM +0000, Fabio Baltieri wrote: > > > On Fri, Feb 06, 2026 at 08:25:14AM -0800, Dmitry Torokhov wrote: > > > > > > > > I do not believe this flag is needed. Always do FN processing. If there > > > > is no FN in the keymap it should work just fine. > > > > > > The problem is that if there is an Fn key and a keymap, hence we process > > > the Fn keys in the kernel, then we don't send the Fn events, but we > > > currently have devices deployed with an Fn key where the key is handled > > > by the userspace and they expect KEY_FN events to be emitted, so if I > > > let the "fn keymap" logic kick in it unconditionally it would cause a > > > regression for existing devices. > > > > Hmm, I see. Then I think we really need to have it as a device property, > > because keymap can be manipulated at runtime, so depending on it to > > switch processing seems weird. > > > > It is like autorepeat, either device configuration asks for it, or it > > does not... > > Ok, the DT folks were fairly explicit about not wanting anything that > even remotely looks like configuration into dt. Right now the behavior > changes based on what's in the keymap, which I think is fine. > > I see the keymap can be manipulated in runtime but then I guess I could > just install a custom hook to idev->setkeycode, recompute > cros_ec_keyb_has_fn_map() and then call input_default_getkeycode()? > I'd have to make that function public but then it'd automatically change > the behavior in runtime as keycodes are defined/undefined. > > Would that be acceptable? OK, let's see how it will look like. Exporting input_default_setkeycode() should be fine, we just need to stick lockdep_assert_held() there to make sure it is not called without event lock being held. Thanks. -- Dmitry