1# Copyright 2023 Google LLC
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig INPUT
5	bool "Input"
6	help
7	  Include input subsystem and drivers in the system config.
8
9if INPUT
10
11module = INPUT
12module-str = input
13source "subsys/logging/Kconfig.template.log_config"
14
15config INPUT_INIT_PRIORITY
16	int "Input subsystem and drivers init priority"
17	default 90
18	help
19	  Input subsystem and drivers initialization priority.
20
21choice INPUT_MODE
22	prompt "Input event processing mode"
23	default INPUT_MODE_THREAD
24
25config INPUT_MODE_SYNCHRONOUS
26	bool "Process input events synchronously"
27	help
28	  Input events callbacks are processed synchronously in the context of
29	  the code that is reporting the event.
30
31config INPUT_MODE_THREAD
32	bool "Process input events in a dedicated thread"
33	depends on MULTITHREADING
34	help
35	  Input events are added to a message queue and the callbacks are
36	  processed asynchronously in a dedicated thread.
37
38endchoice
39
40if INPUT_MODE_THREAD
41
42config INPUT_THREAD_PRIORITY_OVERRIDE
43	bool "Override default input thread priority"
44	help
45	  Option to change the default value of input thread priority.
46
47if INPUT_THREAD_PRIORITY_OVERRIDE
48config INPUT_THREAD_PRIORITY
49	int "Input thread priority"
50	default 0
51	help
52	  Set thread priority of the input
53endif
54
55config INPUT_QUEUE_MAX_MSGS
56	int "Input queue max messages"
57	default 16
58	help
59	  Maximum number of messages in the input event queue.
60
61config INPUT_THREAD_STACK_SIZE
62	int "Input thread stack size"
63	default 512
64	help
65	  Stack size for the thread processing the input events, must have
66	  enough space for executing the registered callbacks.
67
68endif # INPUT_MODE_THREAD
69
70config INPUT_LONGPRESS
71	bool "Input longpress"
72	default y
73	depends on DT_HAS_ZEPHYR_INPUT_LONGPRESS_ENABLED
74
75endif # INPUT
76