Re: [PATCH v4 1/1] Input: cros_ec_keyb - add function key support

From: Simon Glass

Date: Tue Jan 06 2026 - 11:22:22 EST


Hi Fabio,

On Tue, 6 Jan 2026 at 04:29, Fabio Baltieri <fabiobaltieri@xxxxxxxxxxxx> 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 <fabiobaltieri@xxxxxxxxxxxx>
> ---
> drivers/input/keyboard/cros_ec_keyb.c | 174 +++++++++++++++++++++++---
> 1 file changed, 158 insertions(+), 16 deletions(-)
>

Reviewed-by: Simon Glass <sjg@xxxxxxxxxxxx>

> diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
> index 1c6b0461dc35..74ac1700b104 100644
> --- a/drivers/input/keyboard/cros_ec_keyb.c
> +++ b/drivers/input/keyboard/cros_ec_keyb.c
> @@ -29,6 +29,11 @@
>
> #include <linux/unaligned.h>
>
> +/* Maximum size of the normal key matrix, this is limited by the host command
> + * key_matrix field defined in ec_response_get_next_data_v3
> + */
> +#define CROS_EC_KEYBOARD_COLS_MAX 18
> +
> /**
> * struct cros_ec_keyb - Structure representing EC keyboard device
> *
> @@ -44,6 +49,11 @@
> * @bs_idev: The input device for non-matrix buttons and switches (or NULL).
> * @notifier: interrupt event notifier for transport devices
> * @vdata: vivaldi function row data
> + * @has_fn_map: whether the driver use an fn function map layer

How about: driver uses an fn function-map layer

Regards.

Simon