Raul Rangel has submitted this change. ( https://review.coreboot.org/c/coreboot/+/52737 )
Change subject: libpayload: i8042: Enable keyboard translation by default on exit ......................................................................
libpayload: i8042: Enable keyboard translation by default on exit
Add a Kconfig option to set the keyboard translation state on exit and set the default to true. This restores the keyboard to the power-up defaults for firmware that does not always run libpayload keyboard init to have consistent state, and provides an option to disable translation for keyboards that might need it.
Change-Id: I25dfe3f425a5bb57e97476564886672b707aa3bd Signed-off-by: Duncan Laurie dlaurie@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/52737 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Felix Singer felixsinger@posteo.net Reviewed-by: Raul Rangel rrangel@chromium.org Reviewed-by: Nico Huber nico.h@gmx.de --- M payloads/libpayload/Kconfig M payloads/libpayload/drivers/i8042/keyboard.c 2 files changed, 6 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Furquan Shaikh: Looks good to me, approved Felix Singer: Looks good to me, but someone else must approve Raul Rangel: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
diff --git a/payloads/libpayload/Kconfig b/payloads/libpayload/Kconfig index 7a502b5..f7d78e0 100644 --- a/payloads/libpayload/Kconfig +++ b/payloads/libpayload/Kconfig @@ -385,6 +385,11 @@ depends on PC_KEYBOARD default n
+config PC_KEYBOARD_TRANSLATION + bool "Enable or Disable translation in PC keyboard set 2 on exit" + depends on PC_KEYBOARD + default y + endmenu
menu "Drivers" diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c index a695723..952f5f1 100644 --- a/payloads/libpayload/drivers/i8042/keyboard.c +++ b/payloads/libpayload/drivers/i8042/keyboard.c @@ -658,7 +658,7 @@ /* Nobody but us seems to still use scancode set #1. So try to hand over with more modern settings. */ set_scancode_set(2); - i8042_set_kbd_translation(false); + i8042_set_kbd_translation(CONFIG(LP_PC_KEYBOARD_TRANSLATION));
/* Send keyboard disconnect command */ i8042_cmd(I8042_CMD_DIS_KB);