1# Copyright (c) 2023 Kurtis Dinelle 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig TSL2591 5 bool "OSRAM-AMS TSL2591 light sensor" 6 default y 7 depends on DT_HAS_AMS_TSL2591_ENABLED 8 select I2C 9 help 10 Enable driver for TSL2591 sensor. 11 12if TSL2591 13config TSL2591_FETCH_WAIT 14 bool "Wait for valid sensor reading before fetch" 15 help 16 If set, the driver will automatically wait for the duration of an integration cycle 17 during a fetch call if necessary. 18 19config TSL2591_WARN_SATURATED 20 bool "Warn if sensor is potentially saturated" 21 help 22 If set, the driver will warn if the sensor ADC is 23 potentially saturated after a data fetch. 24 25config TSL2591_TRIGGER 26 bool 27 28choice 29 prompt "Trigger mode" 30 default TSL2591_TRIGGER_NONE 31 help 32 Specify the type of triggering to be used by the driver. 33 34config TSL2591_TRIGGER_NONE 35 bool "No trigger" 36 37config TSL2591_TRIGGER_GLOBAL_THREAD 38 bool "Use global thread" 39 depends on GPIO 40 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_AMS_TSL2591),int-gpios) 41 select TSL2591_TRIGGER 42 43config TSL2591_TRIGGER_OWN_THREAD 44 bool "Use own thread" 45 depends on GPIO 46 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_AMS_TSL2591),int-gpios) 47 select TSL2591_TRIGGER 48 49endchoice 50 51config TSL2591_THREAD_PRIORITY 52 int "Thread priority" 53 depends on TSL2591_TRIGGER_OWN_THREAD 54 default 10 55 help 56 Priority of thread used by the driver to handle interrupts. 57 58config TSL2591_THREAD_STACK_SIZE 59 int "Thread stack size" 60 depends on TSL2591_TRIGGER_OWN_THREAD 61 default 1024 62 help 63 Stack size of thread used by the driver to handle interrupts. 64 65endif # TSL2591 66