diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2020-06-22 09:16:03 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-23 05:38:53 +0000 |
commit | 0204b81f09bf4042a89d5eb031bb8e767d1aff99 (patch) | |
tree | f6fdf50626e5df7e7eba7f1e86675ee13667060d | |
parent | c995f0eca43bc89f2b10bffcb2668c22e7bec233 (diff) | |
download | chrome-ec-0204b81f09bf4042a89d5eb031bb8e767d1aff99.tar.gz |
common: add CONFIG_POWER_SIGNAL_RUNTIME_CONFIG
This patch add config: CONFIG_POWER_SUGNAL_RUNTIME_CONFIG
to allow board modified power signal gpio if needed.
BUG=b:150278507, b:152841287
BRANCH=none
TEST=make buildall
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I5c885f9cb3400f3354a18b6d497340dfe3ad993b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2256624
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | include/config.h | 3 | ||||
-rw-r--r-- | include/power.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 70d9179789..cd09eed545 100644 --- a/include/config.h +++ b/include/config.h @@ -641,6 +641,9 @@ /*****************************************************************************/ +/* EC can choose power signal gpio by schematic version */ +#undef CONFIG_POWER_SIGNAL_RUNTIME_CONFIG + /* EC has GPIOs to allow board to reset RTC */ #undef CONFIG_BOARD_HAS_RTC_RESET diff --git a/include/power.h b/include/power.h index 41d7a5585d..fd0c9af432 100644 --- a/include/power.h +++ b/include/power.h @@ -69,7 +69,11 @@ struct power_signal_info { * Each board must provide its signal list and a corresponding enum * power_signal. */ +#ifdef CONFIG_POWER_SIGNAL_RUNTIME_CONFIG +extern struct power_signal_info power_signal_list[]; +#else extern const struct power_signal_info power_signal_list[]; +#endif /* Convert enum power_signal to a mask for signal functions */ #define POWER_SIGNAL_MASK(signal) (1 << (signal)) |