Skip to content

Commit 57a7702

Browse files
gmarullcarlescufi
authored andcommitted
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 <[email protected]>
1 parent 4c9aef9 commit 57a7702

File tree

1 file changed

+2
-1
lines changed
  • drivers/sensor/examplesensor

1 file changed

+2
-1
lines changed

drivers/sensor/examplesensor/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
config EXAMPLESENSOR
55
bool "Example sensor"
6-
depends on GPIO
6+
default y
7+
depends on GPIO && DT_HAS_ZEPHYR_EXAMPLESENSOR_ENABLED
78
help
89
Enable example sensor

0 commit comments

Comments
 (0)