summaryrefslogtreecommitdiff
path: root/zephyr/include
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/include')
-rw-r--r--zephyr/include/ap_power/ap_power_events.h2
-rw-r--r--zephyr/include/ap_power/ap_power_interface.h8
-rw-r--r--zephyr/include/ap_power/ap_pwrseq.h14
3 files changed, 19 insertions, 5 deletions
diff --git a/zephyr/include/ap_power/ap_power_events.h b/zephyr/include/ap_power/ap_power_events.h
index 8a6a9764de..f729c68e9e 100644
--- a/zephyr/include/ap_power/ap_power_events.h
+++ b/zephyr/include/ap_power/ap_power_events.h
@@ -11,6 +11,8 @@
#ifndef __AP_POWER_AP_EVENTS_H__
#define __AP_POWER_AP_EVENTS_H__
+#include <ap_power/ap_power.h>
+
/**
* @brief Dispatch callbacks for an event.
*
diff --git a/zephyr/include/ap_power/ap_power_interface.h b/zephyr/include/ap_power/ap_power_interface.h
index d2808f6075..9a36091deb 100644
--- a/zephyr/include/ap_power/ap_power_interface.h
+++ b/zephyr/include/ap_power/ap_power_interface.h
@@ -9,7 +9,6 @@
*
* Defines the interface to the AP power sequence module,
* which includes:
- * - enums for the power state of the AP
* - enums for the power state mask of the AP
* - enums indicating the reason for shutdown
* - enums for providing control values
@@ -28,6 +27,7 @@
#include <zephyr/sys/util.h>
+#ifndef CONFIG_AP_PWRSEQ_DRIVER
/**
* @brief System power states for Non Deep Sleep Well
* EC is an always on device in a Non Deep Sx system except when EC
@@ -84,6 +84,7 @@ enum power_states_ndsx {
SYS_POWER_STATE_S0S0ix,
#endif
};
+#endif /* CONFIG_AP_PWRSEQ_DRIVER */
/**
* @brief Represents the state of the AP as a mask.
@@ -218,4 +219,9 @@ void ap_power_force_shutdown(enum ap_power_shutdown_reason reason);
*/
void ap_power_init_reset_log(void);
+/**
+ * @brief Starts the AP power sequence thread.
+ */
+void ap_pwrseq_task_start(void);
+
#endif /* __AP_POWER_AP_POWER_INTERFACE_H__ */
diff --git a/zephyr/include/ap_power/ap_pwrseq.h b/zephyr/include/ap_power/ap_pwrseq.h
index f7324b0f6c..813b4f231b 100644
--- a/zephyr/include/ap_power/ap_pwrseq.h
+++ b/zephyr/include/ap_power/ap_pwrseq.h
@@ -8,10 +8,9 @@
#include <zephyr/device.h>
#include <zephyr/kernel.h>
-/** Starts the AP power sequence thread */
-void ap_pwrseq_task_start(void);
-
+#ifndef CONFIG_AP_PWRSEQ_DRIVER
void ap_pwrseq_wake(void);
+#else
#ifdef __cplusplus
extern "C" {
@@ -31,7 +30,13 @@ extern "C" {
AP_POWER_SUB_STATE_ENUM_DEF_WITH_COMMA)), \
())))
-/** @brief AP power sequence valid power states. */
+/**
+ * @brief AP power sequence valid power states.
+ *
+ * Note: States enum list MUST remain arranged from the lowest to the highest
+ * power state.
+ *
+ **/
/* clang-format off */
enum ap_pwrseq_state {
AP_POWER_STATE_UNINIT, /* EC and AP are Uninitialized */
@@ -203,4 +208,5 @@ int ap_pwrseq_register_state_exit_callback(
#ifdef __cplusplus
}
#endif
+#endif /* CONFIG_AP_PWRSEQ_DRIVER */
#endif /* _AP_PWRSEQ_H_ */