1# Copyright 2023 Google LLC
2# SPDX-License-Identifier: Apache-2.0
3
4config INPUT_KBD_MATRIX
5	bool
6	depends on MULTITHREADING
7	help
8	  Enable library used for keyboard matrix drivers.
9
10if INPUT_KBD_MATRIX
11
12config INPUT_KBD_MATRIX_THREAD_STACK_SIZE
13	int "Stack size for the keyboard matrix thread"
14	default 1024
15	help
16	  Size of the stack used for the keyboard matrix thread.
17
18
19config INPUT_KBD_MATRIX_THREAD_PRIORITY
20	int "Priority for the keyboard matrix thread"
21	default 0
22	help
23	  Priority level of the keyboard matrix thread.
24
25config INPUT_KBD_MATRIX_16_BIT_ROW
26	bool "16 bit row size support"
27	help
28	  Use a 16 bit type for the internal structure, allow using a matrix
29	  with up to 16 rows if the driver supports it.
30
31config INPUT_KBD_ACTUAL_KEY_MASK_DYNAMIC
32	bool "Allow runtime changes to the actual key mask"
33	help
34	  If enabled, the actual-key-mask devicetree property data is stored in
35	  RAM, and a input_kbd_matrix_actual_key_mask_set() function is
36	  available to change the content at runtime.
37
38config INPUT_SHELL_KBD_MATRIX_STATE
39	bool "Input kbd_matrix_state shell command"
40	depends on INPUT_SHELL
41	help
42	  Enable an input kbd_matrix_state shell command to log the state of a
43	  keyboard matrix device.
44
45config INPUT_SHELL_KBD_MATRIX_STATE_MAX_COLS
46	int "Maximum column count for the kbd_matrix_state command"
47	default 32
48	depends on INPUT_SHELL_KBD_MATRIX_STATE
49	help
50	  Maximum column count for a device processed by the input
51	  kbd_matrix_state shell command.
52
53config INPUT_KBD_DRIVE_COLUMN_HOOK
54	bool
55	help
56	  Call an application specific hook after the driver specific
57	  drive_column implementation. The application must implement the
58	  input_kbd_matrix_drive_column_hook function.
59
60endif # INPUT_KBD_MATRIX
61