diff --git a/include/pm/state.h b/include/pm/state.h index 21f71933727..50f906ba1ad 100644 --- a/include/pm/state.h +++ b/include/pm/state.h @@ -167,8 +167,8 @@ struct pm_state_info { * @return macro function to construct a pm_state_info */ #define Z_PM_STATE_INFO_DT_ITEMS_LISTIFY_FUNC(child, node_id) \ - PM_STATE_INFO_DT_ITEM(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, \ - child)) + PM_STATE_INFO_DT_INIT(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, \ + child)), /** * @brief Macro function to construct enum pm_state item in UTIL_LISTIFY @@ -184,18 +184,18 @@ struct pm_state_info { /** @endcond */ /** - * @brief Construct a pm_state_info from a DT node identifier. + * @brief Initializer for struct pm_state_info given a DT node identifier with + * zephyr,power-state compatible. * * @param node_id A node identifier with compatible zephyr,power-state - * @return pm_state_info item for the given node. */ -#define PM_STATE_INFO_DT_ITEM(node_id) \ +#define PM_STATE_INFO_DT_INIT(node_id) \ { \ .state = DT_ENUM_IDX(node_id, power_state_name), \ .substate_id = DT_PROP_OR(node_id, substate_id, 0), \ .min_residency_us = DT_PROP_OR(node_id, min_residency_us, 0), \ .exit_latency_us = DT_PROP_OR(node_id, exit_latency_us, 0), \ - }, + } /** * @brief Construct a pm_state enum from a DT node identifier.