Skip to content
Commit 87209984 authored by TOKITA Hiroshi's avatar TOKITA Hiroshi Committed by Martí Bolívar
Browse files

devicetree: rename and publish DT_COMPAT_ON_BUS_INTERNAL



Rename `DT_COMPAT_ON_BUS_INTERNAL` to
`DT_HAS_COMPAT_ON_BUS_STATUS_OKAY` to make it a public DT API.

It is helpful for code that handles multiple DT_DRV_COMPAT in one file,
such as in the following cases.

```
 #if (DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(some_sensor, i2c) || \
      DT_HAS_COMPAT_ON_BUS_STATUS_OKAY(another_sensor, i2c)
 ...
 #endif

 #define DT_DRV_COMPAT some_sensor
 DT_INST_FOREACH_STATUS_OKAY(DEFINE_SOME_SENSOR)

 #undef DT_DRV_COMPAT
 #define DT_DRV_COMPAT another_sensor
 DT_INST_FOREACH_STATUS_OKAY(DEFINE_ANOTHER_SENSOR)
```

Signed-off-by: default avatarTOKITA Hiroshi <tokita.hiroshi@gmail.com>
parent 45e66de5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment