1# ISL29035 light sensor configuration options
2
3# Copyright (c) 2016 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ISL29035
7	bool "ISL29035 light sensor"
8	default y
9	depends on DT_HAS_ISIL_ISL29035_ENABLED
10	select I2C
11	help
12	  Enable driver for the ISL29035 light sensor.
13
14if ISL29035
15
16config ISL29035_THREAD_PRIORITY
17	int "Thread priority"
18	default 10
19	help
20	  Priority of thread used to handle the timer and threshold triggers.
21
22choice
23	prompt "Full scale lux range"
24	default ISL29035_LUX_RANGE_1K
25	help
26	  Maximum allowable lux value. Lower range values offer better
27	  resolution.
28
29config ISL29035_LUX_RANGE_1K
30	bool "1000"
31
32config ISL29035_LUX_RANGE_4K
33	bool "4000"
34
35config ISL29035_LUX_RANGE_16K
36	bool "16000"
37
38config ISL29035_LUX_RANGE_64K
39	bool "64000"
40
41endchoice
42
43choice
44	prompt "Integration time"
45	default ISL29035_INTEGRATION_TIME_105K
46	help
47	  The sampling period of the internal ADC of the light sensor.
48	  Lower integration time values mean lower ADC resolution.
49
50config ISL29035_INTEGRATION_TIME_26
51	bool "0.0256 ms"
52
53config ISL29035_INTEGRATION_TIME_410
54	bool "0.41 ms"
55
56config ISL29035_INTEGRATION_TIME_6500
57	bool "6.5 ms"
58
59config ISL29035_INTEGRATION_TIME_105K
60	bool "105 ms"
61
62endchoice
63
64choice
65	prompt "Active sensing mode"
66	default ISL29035_MODE_ALS
67	help
68	  Sensing mode in which the ISL29035 will function. The chip can be
69	  configured either for either ambient light or infrared sensing.
70
71config ISL29035_MODE_ALS
72	bool "ambient light"
73	help
74	  Sensing mode for ambient light spectrum.
75
76config ISL29035_MODE_IR
77	bool "infrared"
78	help
79	  Sensing mode for infrared spectrum.
80
81endchoice
82
83choice
84	prompt "Trigger mode"
85	depends on ISL29035_MODE_ALS && GPIO
86	default ISL29035_TRIGGER_NONE
87	help
88	  Specify the type of triggering to be used by the driver.
89	  Only available for ambient light sensing mode.
90
91config ISL29035_TRIGGER_NONE
92	bool "No trigger"
93
94config ISL29035_TRIGGER_GLOBAL_THREAD
95	bool "Use global thread"
96	depends on GPIO
97	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ISIL_ISL29035),int-gpios)
98	select ISL29035_TRIGGER
99
100config ISL29035_TRIGGER_OWN_THREAD
101	bool "Use own thread"
102	depends on GPIO
103	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ISIL_ISL29035),int-gpios)
104	select ISL29035_TRIGGER
105
106endchoice
107
108config ISL29035_TRIGGER
109	bool
110
111config ISL29035_THREAD_PRIORITY
112	int "Thread priority"
113	depends on ISL29035_TRIGGER_OWN_THREAD
114	default 10
115	help
116	  Priority of thread used by the driver to handle interrupts.
117
118config ISL29035_THREAD_STACK_SIZE
119	int "Thread stack size"
120	depends on ISL29035_TRIGGER_OWN_THREAD
121	default 1024
122	help
123	  Stack size of thread used by the driver to handle interrupts.
124
125choice
126	prompt "Interrupt persist cycles"
127	depends on ISL29035_TRIGGER
128	default ISL29035_INT_PERSIST_1
129	help
130	  Number of consecutive integration cycles for which the data samples
131	  need to remain outside the threshold window in order for the interrupt
132	  to be triggered.
133
134config ISL29035_INT_PERSIST_1
135	bool "1"
136
137config ISL29035_INT_PERSIST_4
138	bool "4"
139
140config ISL29035_INT_PERSIST_8
141	bool "8"
142
143config ISL29035_INT_PERSIST_16
144	bool "16"
145
146endchoice
147
148endif # ISL29035
149