Re: [PATCH 1/3] dt-bindings: input: cros-ec-keyb: Add a new property

From: Dmitry Torokhov
Date: Tue Dec 29 2020 - 01:25:19 EST


Hi Philip,

On Mon, Dec 21, 2020 at 05:47:57PM -0800, Philip Chen wrote:
> This patch adds a new property `google,custom-keyb-top-row` to the
> device tree for the custom keyboard top row design.

Why don't we use the property we have for the same purpose in atkbd.c?
I.e. function-row-physmap?

Also, instead of specifying keycodes in this array we should use
combination of row and column identifying keys, like this:

function-row-physmap = <
MATRIX_KEY(0x00, 0x02, KEY_F1),
MATRIX_KEY(0x03, 0x02, KEY_F2),
...
>;

Note that the last item in the triple is purely cosmetic in this case,
you can change it to 0. It is row and column that are important.

Then the mapping will work properly even if we change keymap, for
example from userspace.

Thanks.

--
Dmitry