1# VCNL4040 Proximity and Ambient Light Sensor configuration options
2
3# Copyright (c) 2020 Richard Osterloh
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig VCNL4040
7	bool "VCNL4040 Proximity and Ambient Light Sensor"
8	default y
9	depends on DT_HAS_VISHAY_VCNL4040_ENABLED
10	select I2C
11	help
12	  Enable driver for VCNL4040 sensors.
13
14if VCNL4040
15
16config VCNL4040_ENABLE_ALS
17	bool "Ambient light sensor"
18	help
19	  Enable Ambient Light Sense (ALS).
20
21config VCNL4040_TRIGGER
22	bool
23
24choice VCNL4040_TRIGGER
25	prompt "Trigger mode"
26	default VCNL4040_TRIGGER_NONE
27	help
28	  Specify the type of triggering to be used by the driver.
29
30config VCNL4040_TRIGGER_NONE
31	bool "No trigger"
32
33config VCNL4040_TRIGGER_GLOBAL_THREAD
34	bool "Use global thread"
35	depends on GPIO
36	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_VISHAY_VCNL4040),int-gpios)
37	select VCNL4040_TRIGGER
38
39config VCNL4040_TRIGGER_OWN_THREAD
40	bool "Use own thread"
41	depends on GPIO
42	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_VISHAY_VCNL4040),int-gpios)
43	select VCNL4040_TRIGGER
44
45endchoice
46
47config VCNL4040_THREAD_PRIORITY
48	int "Thread priority"
49	depends on VCNL4040_TRIGGER_OWN_THREAD
50	default 10
51	help
52	  Priority of thread used by the driver to handle interrupts.
53
54config VCNL4040_THREAD_STACK_SIZE
55	int "Thread stack size"
56	depends on VCNL4040_TRIGGER_OWN_THREAD
57	default 1024
58	help
59	  Stack size of thread used by the driver to handle interrupts.
60
61endif # VCNL4040
62