1# Copyright (c) 2017 Intel Corporation 2# Copyright (c) 2018 Phytec Messtechnik GmbH 3# SPDX-License-Identifier: Apache-2.0 4 5menuconfig APDS9960 6 bool "APDS9960 Sensor" 7 default y 8 depends on DT_HAS_AVAGO_APDS9960_ENABLED 9 select I2C 10 help 11 Enable driver for APDS9960 sensors. 12 13if APDS9960 14 15choice 16 prompt "Trigger mode" 17 default APDS9960_TRIGGER_NONE 18 help 19 Specify the type of triggering used by the driver. 20 21config APDS9960_TRIGGER_NONE 22 bool "No trigger" 23 24config APDS9960_TRIGGER_GLOBAL_THREAD 25 bool "Use global thread" 26 depends on GPIO 27 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_AVAGO_APDS9960),int-gpios) 28 select APDS9960_TRIGGER 29 30endchoice 31 32config APDS9960_TRIGGER 33 bool 34 35choice APDS9960_FETCH_MODE 36 prompt "Fetching Mode" 37 default APDS9960_FETCH_MODE_INTERRUPT 38 help 39 Specify whether to wait for interrupt 40 41config APDS9960_FETCH_MODE_POLL 42 bool "Poll without interrupt pin" 43 help 44 Uses I2C to check sample 45 46config APDS9960_FETCH_MODE_INTERRUPT 47 bool "Wait for interrupt" 48 depends on GPIO 49 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_AVAGO_APDS9960),int-gpios) 50 help 51 Wait for interrupt before reading 52 53endchoice 54 55config APDS9960_ENABLE_ALS 56 bool "Ambient Light Sense" 57 default y 58 help 59 Enable Ambient Light Sense (ALS). 60 61choice 62 prompt "Proximity Gain" 63 default APDS9960_PGAIN_4X 64 65config APDS9960_PGAIN_1X 66 bool "1x" 67 68config APDS9960_PGAIN_2X 69 bool "2x" 70 71config APDS9960_PGAIN_4X 72 bool "4x" 73 74config APDS9960_PGAIN_8X 75 bool "8x" 76 77endchoice 78 79choice 80 prompt "ALS and Color Gain" 81 default APDS9960_AGAIN_4X 82 83config APDS9960_AGAIN_1X 84 bool "1x" 85 86config APDS9960_AGAIN_4X 87 bool "4x" 88 89config APDS9960_AGAIN_16X 90 bool "16x" 91 92config APDS9960_AGAIN_64X 93 bool "64x" 94 95endchoice 96 97choice 98 prompt "Proximity Pulse Length" 99 default APDS9960_PPULSE_LENGTH_8US 100 101config APDS9960_PPULSE_LENGTH_4US 102 bool "4us" 103 104config APDS9960_PPULSE_LENGTH_8US 105 bool "8us" 106 107config APDS9960_PPULSE_LENGTH_16US 108 bool "16us" 109 110config APDS9960_PPULSE_LENGTH_32US 111 bool "32us" 112 113endchoice 114 115choice 116 prompt "Proximity LED boost current" 117 default APDS9960_PLED_BOOST_100PCT 118 119config APDS9960_PLED_BOOST_300PCT 120 bool "300%" 121 122config APDS9960_PLED_BOOST_200PCT 123 bool "200%" 124 125config APDS9960_PLED_BOOST_150PCT 126 bool "150%" 127 128config APDS9960_PLED_BOOST_100PCT 129 bool "100%" 130 131endchoice 132 133config APDS9960_PPULSE_COUNT 134 int "Proximity Pulse Count" 135 range 1 64 136 default 8 137 138endif # APDS9960 139