From 57a7702f1b7e922e90008cf8abe7a1b9fc67948e Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Wed, 13 Jul 2022 10:40:06 +0200 Subject: [PATCH] drivers: sensor: examplesensor: use DT_HAS_* helper Make zephyr,examplesensor driver option dependent on it being defined in Kconfig and set its default based on DT status as well. Signed-off-by: Gerard Marull-Paretas --- drivers/sensor/examplesensor/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/sensor/examplesensor/Kconfig b/drivers/sensor/examplesensor/Kconfig index 1cb49b2..384a5fa 100644 --- a/drivers/sensor/examplesensor/Kconfig +++ b/drivers/sensor/examplesensor/Kconfig @@ -3,6 +3,7 @@ config EXAMPLESENSOR bool "Example sensor" - depends on GPIO + default y + depends on GPIO && DT_HAS_ZEPHYR_EXAMPLESENSOR_ENABLED help Enable example sensor