summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@google.com>2021-05-13 14:51:38 -0600
committerCommit Bot <commit-bot@chromium.org>2021-05-17 20:39:38 +0000
commitc751ce41a5c98a0e5991e9ba35c6937ef6809f8f (patch)
tree5861e200bd79622514e408ab3cc937adf0fed89e
parent84a659bc2e49b106dfa45b962a86027515284a1e (diff)
downloadchrome-ec-c751ce41a5c98a0e5991e9ba35c6937ef6809f8f.tar.gz
asurada: relocate power_signal_list for common use with zephyr
BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Idb71acc9b8d6d903766e51bd3848a3200e1e50e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895305 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
-rw-r--r--baseboard/asurada/baseboard.c8
-rw-r--r--baseboard/asurada/build.mk4
-rw-r--r--baseboard/asurada/power.c14
3 files changed, 17 insertions, 9 deletions
diff --git a/baseboard/asurada/baseboard.c b/baseboard/asurada/baseboard.c
index edefec3ff3..581854f1a5 100644
--- a/baseboard/asurada/baseboard.c
+++ b/baseboard/asurada/baseboard.c
@@ -103,14 +103,6 @@ __override void board_hibernate_late(void)
__builtin_unreachable();
}
-/* power signal list. Must match order of enum power_signal. */
-const struct power_signal_info power_signal_list[] = {
- {GPIO_PMIC_EC_PWRGD, POWER_SIGNAL_ACTIVE_HIGH, "PMIC_PWR_GOOD"},
- {GPIO_AP_IN_SLEEP_L, POWER_SIGNAL_ACTIVE_LOW, "AP_IN_S3_L"},
- {GPIO_AP_EC_WATCHDOG_L, POWER_SIGNAL_ACTIVE_LOW, "AP_WDT_ASSERTED"},
-};
-BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
-
/* Detect subboard */
static void board_tcpc_init(void)
{
diff --git a/baseboard/asurada/build.mk b/baseboard/asurada/build.mk
index 58e9934bc0..fced6993eb 100644
--- a/baseboard/asurada/build.mk
+++ b/baseboard/asurada/build.mk
@@ -6,5 +6,7 @@
# Baseboard specific files build
#
-baseboard-y=baseboard.o board_id.o
+baseboard-y=baseboard.o
+baseboard-y+=board_id.o
+baseboard-y+=power.o
baseboard-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_policy.o
diff --git a/baseboard/asurada/power.c b/baseboard/asurada/power.c
new file mode 100644
index 0000000000..7d758b29bd
--- /dev/null
+++ b/baseboard/asurada/power.c
@@ -0,0 +1,14 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#include "gpio.h"
+#include "power.h"
+
+/* power signal list. Must match order of enum power_signal. */
+const struct power_signal_info power_signal_list[] = {
+ {GPIO_PMIC_EC_PWRGD, POWER_SIGNAL_ACTIVE_HIGH, "PMIC_PWR_GOOD"},
+ {GPIO_AP_IN_SLEEP_L, POWER_SIGNAL_ACTIVE_LOW, "AP_IN_S3_L"},
+ {GPIO_AP_EC_WATCHDOG_L, POWER_SIGNAL_ACTIVE_LOW, "AP_WDT_ASSERTED"},
+};
+BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);