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 <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2022-07-13 10:40:06 +02:00 committed by Carles Cufí
parent 4c9aef9d6e
commit 57a7702f1b

View file

@ -3,6 +3,7 @@
config EXAMPLESENSOR config EXAMPLESENSOR
bool "Example sensor" bool "Example sensor"
depends on GPIO default y
depends on GPIO && DT_HAS_ZEPHYR_EXAMPLESENSOR_ENABLED
help help
Enable example sensor Enable example sensor