From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 ADB9D33064F for ; Mon, 29 Dec 2025 16:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767025740; cv=none; b=ctUjFj8NDk6XjNAaAAOAwxqO+YWURI2SOpQ/v0Pfa+zlTQqOfCE2uCINc370p8S7ylr3o/hQZSTVuXu7nr/kGutBWqJQ4qSpTNbDcKIF1RFBtv6R/VEBRPCdqHjL4kWYYhYVP9EjPP9RQfSWwuY8AToFw7W/HBVwHxrkPQQ9NtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767025740; c=relaxed/simple; bh=b6RQ1NU9EN8+aXaewi+ayTN9noNZWpegcHiTxkGkE0M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GNUQPXklz22i4J0ctsPvg/dw8FF2YaNh6HYmoRHrw94VrgQnCSxJkpKgZLV6mNl0y7EBn3pxV+BWK0n9MLYfBAjb0E9QOwJhqHw4NF3eYUeZj3ykq0Ry50yvLWTHWmf6P2brMKWqaKBkkXpDY4oqLE4s90PwcVW79YAG/hw8WXg= 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=AkVa7Vwb; arc=none smtp.client-ip=209.85.128.42 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="AkVa7Vwb" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4779adb38d3so60430175e9.2 for ; Mon, 29 Dec 2025 08:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1767025736; x=1767630536; 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=/igAIS0exjkZCSnq4MvZu4y+vS5w9AmRp2TM3hljglc=; b=AkVa7Vwb0H41574gfBMQD0c1TGUpryUE2cGicvRPTYbN19eJTpH+XlKfyIqytXkLR4 jAYPkBksjmtxu59QfMkR904LixpEUr+GtWbTAsWuqkI2ylHgUu2OIy8gzzsmO+hMXgQA W12+0n4XPZ04h+P07GOjvHPBqM0nIkIsUD0h4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767025736; x=1767630536; 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=/igAIS0exjkZCSnq4MvZu4y+vS5w9AmRp2TM3hljglc=; b=fXLtehFFQfk6FZR8m0Z/ciHh1NGyrau+tawr2CYm5y8Nch1OFdRzbqGRrPJS8biNLT bbhCW6Lwy6wOGWMbtOcoUkpooD7yhsnsV4Mf4KuU+wWt93qiEzQbE0wW4SahUmA9uM84 dNHA9T/XaNBwrIe7attcJN82VL/K18kfTXJ7eN3x5JCkwJHYW81uFwffRH4eRXHPM5ey lLAJ0F8uilvPxzp64B8dcJrVHOcUGffo34g2GmLsuxFd3etBHAwCEZA/927vJNJACrSf if0l+5HUhPC+dudw2g/rBIeG1uAOPaHDtzOjIiwbG5Ciu4ypKth/71ANrCo5PaJBsirK UL+g== X-Forwarded-Encrypted: i=1; AJvYcCX4ie2bPtoP4SHiXOWBLDozBQWnwCLRnkf8Q13G3JTrHjEitoQxFT8b6sa9WIlYauci0CC+XKSXYnEFZfY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3jyW+pcr4Krl6TMgRrePdE9so/fmBuNNHJSAlmPSLFDUjA1Du +2Mwbz7pWVIdNzEtUp4MXXQ3a4aAD1oTJ6S2W7oGrLnWSgeSoDqIuB2Rq1p/uAYLNw== X-Gm-Gg: AY/fxX4tpxWRQr7jfgOtxXcn+lnHpJ1yQjsZgIuEK80H6XqN8smTtnFJugQvWc//rG3 r813zO+/stflIpMqrmAfBbxsV57Liogu1+W4+VVN4d9ZuDYq+8LbJ0bNBN6lx/dWALMArh6oXP5 A5CS/qdKj+A+du1WGX91O/wfDao+6iV/tcZCk4mjzc/clS/5oFk76EHAGiI+RmeoaSodfFxizKN F6UKrIoNLL9PVIEQui4HXmaTwFGYmm+DiIr0synzH/S9XdzEPFuwZE8rEy12S/gT/iDaSj0RIyW pl6gFeEnM0Z99bjv/pnQ2uVi6kepdVsDYeB9bpMFLo7Zz2c8xhLMx1FSD8EimRpInyXqRtfHyMp SYUF1qp63n24iIpcl9ze8Q2OkV2am8TPFE6FeGtDDkipugbLdhxH4PI+bsoaYkLL4pI9s2hpIQx 6k+gjveU8W4vcjKqRhtztkFVgFIOQg X-Google-Smtp-Source: AGHT+IE5z77kWrdvT7wPaMpp9A6RiyApVG0i4Gj+RnPn+57arRtLwhAvau2xJ42Pp4CWwsHrv5arXw== X-Received: by 2002:a05:600c:b99:b0:479:3a86:dc1c with SMTP id 5b1f17b1804b1-47d195a6369mr342294615e9.36.1767025736112; Mon, 29 Dec 2025 08:28:56 -0800 (PST) Received: from google.com ([37.228.206.31]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be3a6c6ebsm248468505e9.4.2025.12.29.08.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 08:28:55 -0800 (PST) Date: Mon, 29 Dec 2025 16:28:53 +0000 From: Fabio Baltieri To: Simon Glass Cc: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Benson Leung , Guenter Roeck , Tzung-Bi Shih , linux-input@vger.kernel.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] Input: cros_ec_keyb - add function key support Message-ID: References: <20251224152238.485415-1-fabiobaltieri@chromium.org> <20251224152238.485415-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 Sat, Dec 27, 2025 at 07:24:33AM -0700, Simon Glass wrote: > Hi Fabio, > > On Wed, 24 Dec 2025 at 08:22, Fabio Baltieri wrote: > > > > Add support for handling an Fn button and sending separate keycodes for > > a subset of keys in the matrix defined in the upper half of the keymap. > > > > Signed-off-by: Fabio Baltieri > > --- > > drivers/input/keyboard/cros_ec_keyb.c | 120 ++++++++++++++++++++++---- > > 1 file changed, 104 insertions(+), 16 deletions(-) > > > > Reviewed-by: Simon Glass > > I suggest a function comment for the two new functions you add. Sure, will do. > > + if (code == KEY_FN) > > + return cros_ec_keyb_process_fn_key(ckdev, row, col, state); > > + > > + if (!state) { > > + if (ckdev->fn_key_status[col] & BIT(row)) { > > + pos = MATRIX_SCAN_CODE(row + ckdev->rows, col, ckdev->row_shift); > > + code = keycodes[pos]; > > You might want a helper to do this as it is repeated below Sounds good, adding one for v3 Thanks for the review, Fabio