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	select ISL29035_TRIGGER
98
99config ISL29035_TRIGGER_OWN_THREAD
100	bool "Use own thread"
101	depends on GPIO
102	select ISL29035_TRIGGER
103
104endchoice
105
106config ISL29035_TRIGGER
107	bool
108
109config ISL29035_THREAD_PRIORITY
110	int "Thread priority"
111	depends on ISL29035_TRIGGER_OWN_THREAD
112	default 10
113	help
114	  Priority of thread used by the driver to handle interrupts.
115
116config ISL29035_THREAD_STACK_SIZE
117	int "Thread stack size"
118	depends on ISL29035_TRIGGER_OWN_THREAD
119	default 1024
120	help
121	  Stack size of thread used by the driver to handle interrupts.
122
123choice
124	prompt "Interrupt persist cycles"
125	depends on ISL29035_TRIGGER
126	default ISL29035_INT_PERSIST_1
127	help
128	  Number of consecutive integration cycles for which the data samples
129	  need to remain outside the threshold window in order for the interrupt
130	  to be triggered.
131
132config ISL29035_INT_PERSIST_1
133	bool "1"
134
135config ISL29035_INT_PERSIST_4
136	bool "4"
137
138config ISL29035_INT_PERSIST_8
139	bool "8"
140
141config ISL29035_INT_PERSIST_16
142	bool "16"
143
144endchoice
145
146endif # ISL29035
147