Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/81996?usp=email )
(
4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: acpigen_ps2_keybd: Add assistant key to linux,keymap ......................................................................
acpigen_ps2_keybd: Add assistant key to linux,keymap
If the ChromiumOS EC indicates that the device has an assistant key, we should also add it to the generated linux,keymap binding. This commit simply does so by examining the keyboard capabilities reported by the EC.
BUG=b:333088656 TEST=With a device that has an assistant key, flash AP FW and verify that the key is mapped to `KEY_ASSISTANT` in the Linux kernel using `evtest`.
Change-Id: I217220e89bce88e3045a4fc3b124954696276442 Signed-off-by: Aseda Aboagye aaboagye@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/81996 Reviewed-by: Jonathon Hall jonathon.hall@puri.sm Reviewed-by: Paul Menzel paulepanter@mailbox.org Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Caveh Jalali caveh@chromium.org --- M src/acpi/acpigen_ps2_keybd.c M src/ec/google/chromeec/ec_acpi.c M src/include/acpi/acpigen_ps2_keybd.h M src/mainboard/purism/librem_jsl/ramstage.c 4 files changed, 13 insertions(+), 2 deletions(-)
Approvals: Jonathon Hall: Looks good to me, approved build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Caveh Jalali: Looks good to me, approved
diff --git a/src/acpi/acpigen_ps2_keybd.c b/src/acpi/acpigen_ps2_keybd.c index cc21d5d..4a05225 100644 --- a/src/acpi/acpigen_ps2_keybd.c +++ b/src/acpi/acpigen_ps2_keybd.c @@ -211,6 +211,7 @@ bool can_send_function_keys, bool has_numeric_keypad, bool has_scrnlock_key, + bool has_assistant_key, bool has_alpha_num_punct_keys) { struct acpi_dp *dp_array; @@ -270,6 +271,12 @@ total++; }
+ /* Add the keymap for the assistant key if present */ + if (has_assistant_key) { + acpi_dp_add_integer(dp_array, NULL, KEYMAP(0x5c, KEY_ASSISTANT)); + total++; + } + /* Provide alphanumeric and punctuation keys (rest of the keyboard) if * present */ @@ -291,6 +298,7 @@ bool can_send_function_keys, bool has_numeric_keypad, bool has_scrnlock_key, + bool has_assistant_key, bool has_alpha_num_punct_keys) { struct acpi_dp *dsd; @@ -312,7 +320,8 @@ ssdt_generate_physmap(dsd, num_top_row_keys, action_keys); ssdt_generate_keymap(dsd, num_top_row_keys, action_keys, can_send_function_keys, has_numeric_keypad, - has_scrnlock_key, has_alpha_num_punct_keys); + has_scrnlock_key, has_assistant_key, + has_alpha_num_punct_keys); acpi_dp_write(dsd); acpigen_pop_len(); /* Scope */ } diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c index e24f8ac..61d1e5c 100644 --- a/src/ec/google/chromeec/ec_acpi.c +++ b/src/ec/google/chromeec/ec_acpi.c @@ -257,6 +257,7 @@ !!(keybd.capabilities & KEYBD_CAP_FUNCTION_KEYS), !!(keybd.capabilities & KEYBD_CAP_NUMERIC_KEYPAD), !!(keybd.capabilities & KEYBD_CAP_SCRNLOCK_KEY), + !!(keybd.capabilities & KEYBD_CAP_ASSISTANT_KEY), true); }
diff --git a/src/include/acpi/acpigen_ps2_keybd.h b/src/include/acpi/acpigen_ps2_keybd.h index 263eb05..5a55356 100644 --- a/src/include/acpi/acpigen_ps2_keybd.h +++ b/src/include/acpi/acpigen_ps2_keybd.h @@ -37,6 +37,7 @@ enum ps2_action_key action_keys[], bool can_send_function_keys, bool has_numeric_keypad, bool has_scrnlock_key, + bool has_assistant_key, bool has_alpha_num_punct_keys);
#endif /* __ACPI_ACPIGEN_PS2_KEYBD_H__ */ diff --git a/src/mainboard/purism/librem_jsl/ramstage.c b/src/mainboard/purism/librem_jsl/ramstage.c index b9dd5f2..78a1de0 100644 --- a/src/mainboard/purism/librem_jsl/ramstage.c +++ b/src/mainboard/purism/librem_jsl/ramstage.c @@ -19,7 +19,7 @@ PS2_KEY_VOL_UP }; acpigen_ps2_keyboard_dsd("_SB.PCI0.PS2K", ARRAY_SIZE(ps2_action_keys), - ps2_action_keys, false, false, false, false); + ps2_action_keys, false, false, false, false, false); }
static void mainboard_init(void *chip_info)