summaryrefslogtreecommitdiff
path: root/src/arch/x86/include
diff options
context:
space:
mode:
authorRajat Jain <rajatja@google.com>2020-04-01 17:01:13 -0700
committerFurquan Shaikh <furquan@google.com>2020-04-20 21:34:58 +0000
commita28e3fb694ecff6efefbbeef1d0882731a6a2bd2 (patch)
treee74c989e3cffc5aba8be679ada3358fe2b9c902e /src/arch/x86/include
parente6b0a32cb305f8f201d93ba41215ba9e976c7698 (diff)
arch/x86/acpi: Add code to generate ACPI for PS2 keyboards
Add new file to generate ACPI _DSD code for PS2 keyboards. The following 2 device properties are generated as needed: function-row-phymap: A list of ordered scancodes for function row. linux,keymap: Symantically, this is an array of "scancode,keycode" tuple entries. Each entry teaches linux the keycode corresponding to a scancode. Signed-off-by: Rajat Jain <rajatja@google.com> Change-Id: I5ee05173106a125793e91c263610731543c85472 Reviewed-on: https://review.coreboot.org/c/coreboot/+/40031 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r--src/arch/x86/include/arch/acpigen_ps2_keybd.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/acpigen_ps2_keybd.h b/src/arch/x86/include/arch/acpigen_ps2_keybd.h
new file mode 100644
index 0000000000..c0228bca16
--- /dev/null
+++ b/src/arch/x86/include/arch/acpigen_ps2_keybd.h
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef __ACPIGEN_PS2_KEYBD_H__
+#define __ACPIGEN_PS2_KEYBD_H__
+
+#include <types.h>
+
+enum ps2_action_key {
+ PS2_KEY_ABSENT = 0,
+ PS2_KEY_BACK,
+ PS2_KEY_FORWARD,
+ PS2_KEY_REFRESH,
+ PS2_KEY_FULLSCREEN,
+ PS2_KEY_OVERVIEW,
+ PS2_KEY_BRIGHTNESS_DOWN,
+ PS2_KEY_BRIGHTNESS_UP,
+ PS2_KEY_VOL_MUTE,
+ PS2_KEY_VOL_DOWN,
+ PS2_KEY_VOL_UP,
+ PS2_KEY_SNAPSHOT,
+ PS2_KEY_PRIVACY_SCRN_TOGGLE,
+ PS2_KEY_KBD_BKLIGHT_DOWN,
+ PS2_KEY_KBD_BKLIGHT_UP,
+ PS2_KEY_PLAY_PAUSE,
+ PS2_KEY_NEXT_TRACK,
+ PS2_KEY_PREV_TRACK,
+};
+
+#define PS2_MIN_TOP_ROW_KEYS 10
+#define PS2_MAX_TOP_ROW_KEYS 15
+
+void acpigen_ps2_keyboard_dsd(const char *scope, uint8_t num_top_row_keys,
+ enum ps2_action_key action_keys[],
+ bool can_send_function_keys,
+ bool has_numeric_keypad, bool has_scrnlock_key);
+
+#endif /* __ACPIGEN_PS2_KEYBD_H__ */