diff options
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r-- | src/device/device_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index 6a4577026c..2e97ece2a5 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -261,6 +261,16 @@ const struct device *dev_get_domain(const struct device *dev) return NULL; } +bool is_domain0(const struct device *dev) +{ + return dev && dev->path.type == DEVICE_PATH_DOMAIN && dev->path.domain.domain == 0; +} + +bool is_dev_on_domain0(const struct device *dev) +{ + return is_domain0(dev_get_domain(dev)); +} + /** * Allocate 64 more resources to the free list. * |