Aseda Aboagye has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81895?usp=email )
Change subject: acpigen_ps2_keybd: Add Fn key to linux,keymap ......................................................................
acpigen_ps2_keybd: Add Fn key to linux,keymap
Some devices may generate scancodes for the Fn key if they have one. If they do, we should add them to the linux,keymap binding.
BUG=b:333096023 TEST=Flash DUT that emits a scancode for the Fn key, verify that it is mapped to KEY_FN in the Linux kernel.
Change-Id: Ie4daa64bc6b619392276d0b5f16e2d195d5bd68c Signed-off-by: Aseda Aboagye aaboagye@google.com --- M src/acpi/Kconfig M src/acpi/acpigen_ps2_keybd.c 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/81895/1
diff --git a/src/acpi/Kconfig b/src/acpi/Kconfig index 417ff60..70b2f12 100644 --- a/src/acpi/Kconfig +++ b/src/acpi/Kconfig @@ -14,6 +14,13 @@ Specifies the ACPI name format string used by the acpigen function to generate the processor scope. Default is CPxx.
+config ACPI_FNKEY_GEN_SCANCODE + int + default 0 + help + Specifies the scancode, if any, which is generated when the + Fn key is pressed. + config ACPI_HAVE_PCAT_8259 def_bool y if !ACPI_NO_PCAT_8259
diff --git a/src/acpi/acpigen_ps2_keybd.c b/src/acpi/acpigen_ps2_keybd.c index 67e92a9..8084978 100644 --- a/src/acpi/acpigen_ps2_keybd.c +++ b/src/acpi/acpigen_ps2_keybd.c @@ -243,6 +243,13 @@ acpi_dp_add_integer(dp_array, NULL, keymap); }
+ /* Add the Fn-key */ + if (CONFIG_ACPI_FNKEY_GEN_SCANCODE != 0) { + acpi_dp_add_integer(dp_array, NULL, KEYMAP(CONFIG_ACPI_FNKEY_GEN_SCANCODE, + KEY_FN)); + total++; + } + total += num_top_row_keys; }