summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@google.com>2021-06-22 14:51:41 -0600
committerCommit Bot <commit-bot@chromium.org>2021-06-22 22:59:20 +0000
commit10a9f3c5264a9b9afd882026219687f416ef665f (patch)
tree7173eec3886f13e253fd8a1f949235f5583fb8f6
parent1d02c4bc42571dbe646c76ece2c587ec2cb5b3e7 (diff)
downloadchrome-ec-10a9f3c5264a9b9afd882026219687f416ef665f.tar.gz
mt8192: move power_signal to include
enum power_signal was duplicated in a few places and really belonged in an include file. This has been created as include/power/mt8192.h BUG=b:180980668 BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ibdcecc73feffcfa6d5b72fa8ef503f1802e14925 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2980811 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--baseboard/asurada/baseboard.h9
-rw-r--r--baseboard/cherry/baseboard.h8
-rw-r--r--baseboard/goroh/baseboard.h8
-rw-r--r--include/power/mt8192.h16
-rw-r--r--zephyr/projects/asurada/hayato/include/gpio_map.h15
5 files changed, 25 insertions, 31 deletions
diff --git a/baseboard/asurada/baseboard.h b/baseboard/asurada/baseboard.h
index e4a700eb47..52461d8822 100644
--- a/baseboard/asurada/baseboard.h
+++ b/baseboard/asurada/baseboard.h
@@ -187,16 +187,11 @@
#include "gpio_signal.h"
#include "registers.h"
-
-enum power_signal {
- PMIC_PWR_GOOD,
- AP_IN_S3_L,
- AP_WDT_ASSERTED,
- POWER_SIGNAL_COUNT,
-};
+#include "power/mt8192.h"
void board_reset_pd_mcu(void);
enum board_sub_board board_get_sub_board(void);
void usb_a0_interrupt(enum gpio_signal signal);
+
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BASEBOARD_H */
diff --git a/baseboard/cherry/baseboard.h b/baseboard/cherry/baseboard.h
index f2845e6d44..95cf2fe0bc 100644
--- a/baseboard/cherry/baseboard.h
+++ b/baseboard/cherry/baseboard.h
@@ -189,6 +189,7 @@
#include "gpio_signal.h"
#include "registers.h"
+#include "power/mt8192.h"
enum adc_channel {
ADC_VBUS, /* ADC 0 */
@@ -215,13 +216,6 @@ enum pwm_channel {
PWM_CH_COUNT,
};
-enum power_signal {
- PMIC_PWR_GOOD,
- AP_IN_S3_L,
- AP_WDT_ASSERTED,
- POWER_SIGNAL_COUNT,
-};
-
void board_reset_pd_mcu(void);
#endif /* !__ASSEMBLER__ */
diff --git a/baseboard/goroh/baseboard.h b/baseboard/goroh/baseboard.h
index 070ba2dd9e..b3cfc3f0f9 100644
--- a/baseboard/goroh/baseboard.h
+++ b/baseboard/goroh/baseboard.h
@@ -192,13 +192,7 @@
#include "gpio_signal.h"
#include "registers.h"
-
-enum power_signal {
- PMIC_PWR_GOOD,
- AP_IN_S3_L,
- AP_WDT_ASSERTED,
- POWER_SIGNAL_COUNT,
-};
+#include "power/mt8192.h"
enum board_sub_board {
SUB_BOARD_NONE = -1,
diff --git a/include/power/mt8192.h b/include/power/mt8192.h
new file mode 100644
index 0000000000..e0c65c3bcc
--- /dev/null
+++ b/include/power/mt8192.h
@@ -0,0 +1,16 @@
+/* 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.
+ */
+
+#ifndef __CROS_EC_POWER_MT8192_H_
+#define __CROS_EC_POWER_MT8192_H_
+
+enum power_signal {
+ PMIC_PWR_GOOD,
+ AP_IN_S3_L,
+ AP_WDT_ASSERTED,
+ POWER_SIGNAL_COUNT,
+};
+
+#endif /* __CROS_EC_POWER_MT8192_H_ */
diff --git a/zephyr/projects/asurada/hayato/include/gpio_map.h b/zephyr/projects/asurada/hayato/include/gpio_map.h
index 884361f43f..a0e4bacb30 100644
--- a/zephyr/projects/asurada/hayato/include/gpio_map.h
+++ b/zephyr/projects/asurada/hayato/include/gpio_map.h
@@ -9,6 +9,11 @@
#include <devicetree.h>
#include <gpio_signal.h>
+/*
+ * TODO(b:188674805) create a driver to pull this information from DeviceTree
+ */
+#include "power/mt8192.h"
+
#define GPIO_ENTERING_RW GPIO_UNIMPLEMENTED
#define GPIO_WP_L GPIO_UNIMPLEMENTED
@@ -57,14 +62,4 @@
#define GPIO_EN_PP5000 GPIO_EN_PP5000_A
-/*
- * TODO(b:188674805) create a driver to pull this information from DeviceTree
- */
-enum power_signal {
- PMIC_PWR_GOOD,
- AP_IN_S3_L,
- AP_WDT_ASSERTED,
- POWER_SIGNAL_COUNT,
-};
-
#endif /* __ZEPHYR_GPIO_MAP_H */