diff --git a/drivers/sensor/CMakeLists.txt b/drivers/sensor/CMakeLists.txt index cdd618d342..39ec7342b9 100644 --- a/drivers/sensor/CMakeLists.txt +++ b/drivers/sensor/CMakeLists.txt @@ -25,7 +25,7 @@ add_subdirectory_ifdef(CONFIG_ENS210 ens210) add_subdirectory_ifdef(CONFIG_FDC2X1X fdc2x1x) add_subdirectory_ifdef(CONFIG_FXAS21002 fxas21002) add_subdirectory_ifdef(CONFIG_FXOS8700 fxos8700) -add_subdirectory(grove) +add_subdirectory_ifdef(CONFIG_GROVE_SENSORS grove) add_subdirectory_ifdef(CONFIG_TI_HDC ti_hdc) add_subdirectory_ifdef(CONFIG_TI_HDC20XX ti_hdc20xx) add_subdirectory_ifdef(CONFIG_HMC5883L hmc5883l) diff --git a/drivers/sensor/grove/Kconfig b/drivers/sensor/grove/Kconfig index 032c3dd69b..f9b9d7b149 100644 --- a/drivers/sensor/grove/Kconfig +++ b/drivers/sensor/grove/Kconfig @@ -3,6 +3,13 @@ # Copyright (c) 2015 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +config GROVE_SENSORS + bool "Seeed Grove sensors support" + help + Enable Seeed Grove sensors support. + +if GROVE_SENSORS + config GROVE_LIGHT_SENSOR bool "Enable the Seeed Grove Light Sensor" depends on ADC && !MINIMAL_LIBC @@ -16,3 +23,5 @@ config GROVE_TEMPERATURE_SENSOR help Setting this value will enable driver support for the Grove Temperature Sensor. + +endif # GROVE_SENSORS diff --git a/samples/sensor/grove_light/prj.conf b/samples/sensor/grove_light/prj.conf index 2e852c494a..4b88acfa38 100644 --- a/samples/sensor/grove_light/prj.conf +++ b/samples/sensor/grove_light/prj.conf @@ -1,5 +1,6 @@ CONFIG_ADC=y CONFIG_SENSOR=y +CONFIG_GROVE_SENSORS=y CONFIG_GROVE_LIGHT_SENSOR=y CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y diff --git a/samples/sensor/grove_temperature/prj.conf b/samples/sensor/grove_temperature/prj.conf index 0ba9cf35c0..7e7e509d0c 100644 --- a/samples/sensor/grove_temperature/prj.conf +++ b/samples/sensor/grove_temperature/prj.conf @@ -1,5 +1,6 @@ CONFIG_ADC=y CONFIG_SENSOR=y +CONFIG_GROVE_SENSORS=y CONFIG_GROVE_TEMPERATURE_SENSOR=y CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y