pm: device: adjust flag names
Some flags were using `FLAGS` instead of `FLAG`.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
diff --git a/include/pm/device.h b/include/pm/device.h
index 9227be8..244c615 100644
--- a/include/pm/device.h
+++ b/include/pm/device.h
@@ -53,9 +53,9 @@
* Indicates whether or not the device is capable of waking the system
* up.
*/
- PM_DEVICE_FLAGS_WS_CAPABLE,
+ PM_DEVICE_FLAG_WS_CAPABLE,
/** Indicates if the device is being used as wakeup source. */
- PM_DEVICE_FLAGS_WS_ENABLED,
+ PM_DEVICE_FLAG_WS_ENABLED,
};
/** @brief Device PM actions. */
@@ -137,7 +137,7 @@
.flags = ATOMIC_INIT(COND_CODE_1( \
DT_NODE_EXISTS(node_id), \
(DT_PROP_OR(node_id, wakeup_source, 0)),\
- (0)) << PM_DEVICE_FLAGS_WS_CAPABLE), \
+ (0)) << PM_DEVICE_FLAG_WS_CAPABLE), \
}
/**
diff --git a/subsys/pm/device.c b/subsys/pm/device.c
index 3346a58..1dfc066 100644
--- a/subsys/pm/device.c
+++ b/subsys/pm/device.c
@@ -153,15 +153,15 @@
flags = atomic_get(&pm->flags);
- if ((flags & BIT(PM_DEVICE_FLAGS_WS_CAPABLE)) == 0U) {
+ if ((flags & BIT(PM_DEVICE_FLAG_WS_CAPABLE)) == 0U) {
return false;
}
if (enable) {
new_flags = flags |
- BIT(PM_DEVICE_FLAGS_WS_ENABLED);
+ BIT(PM_DEVICE_FLAG_WS_ENABLED);
} else {
- new_flags = flags & ~BIT(PM_DEVICE_FLAGS_WS_ENABLED);
+ new_flags = flags & ~BIT(PM_DEVICE_FLAG_WS_ENABLED);
}
return atomic_cas(&pm->flags, flags, new_flags);
@@ -176,7 +176,7 @@
}
return atomic_test_bit(&pm->flags,
- PM_DEVICE_FLAGS_WS_ENABLED);
+ PM_DEVICE_FLAG_WS_ENABLED);
}
bool pm_device_wakeup_is_capable(const struct device *dev)
@@ -188,5 +188,5 @@
}
return atomic_test_bit(&pm->flags,
- PM_DEVICE_FLAGS_WS_CAPABLE);
+ PM_DEVICE_FLAG_WS_CAPABLE);
}