diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-09-22 12:54:28 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-03 14:26:09 -0700 |
commit | a27f1049b6d92d46de9a648ba64f451387a598d4 (patch) | |
tree | d7396d9183f565c2fbbecf2b9d4da6bd2880c5e3 /board/reef | |
parent | 29dc221f98fa85efd3b351f0816c037562952753 (diff) | |
download | chrome-ec-a27f1049b6d92d46de9a648ba64f451387a598d4.tar.gz |
power: Add flags parameter to power_signal_info
Replace structure member "level" in power_signal_info with "flags".
"level" has been used on all boards to indicate active-high or
active-low levels. Addition of "flags" allows easy extension of
power_signal_info structure to define various flags that might be
applicable to power signals (e.g. "level"). Going forward, additional
flag will be added in follow-up CLs.
Also, provide a helper function power_signal_is_asserted that checks
the actual level of a signal and compares it to the flags level to
identify if a power signal is asserted.
BUG=b:65421825
BRANCH=None
TEST=make -j buildall
Change-Id: Iacaabd1185b347c17b5159f05520731505b824b8
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/679979
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'board/reef')
-rw-r--r-- | board/reef/board.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/board/reef/board.c b/board/reef/board.c index f71bba079a..206e725af8 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -126,16 +126,17 @@ void tablet_mode_interrupt(enum gpio_signal signal) /* power signal list. Must match order of enum power_signal. */ const struct power_signal_info power_signal_list[] = { #ifdef CONFIG_POWER_S0IX - {GPIO_PCH_SLP_S0_L, 1, "SLP_S0_DEASSERTED"}, + {GPIO_PCH_SLP_S0_L, POWER_SIGNAL_ACTIVE_HIGH, "SLP_S0_DEASSERTED"}, #endif - {GPIO_RSMRST_L_PGOOD, 1, "RSMRST_L"}, - {GPIO_PCH_SLP_S3_L, 1, "SLP_S3_DEASSERTED"}, - {GPIO_PCH_SLP_S4_L, 1, "SLP_S4_DEASSERTED"}, - {GPIO_SUSPWRNACK, 1, "SUSPWRNACK_DEASSERTED"}, - - {GPIO_ALL_SYS_PGOOD, 1, "ALL_SYS_PGOOD"}, - {GPIO_PP3300_PG, 1, "PP3300_PG"}, - {GPIO_PP5000_PG, 1, "PP5000_PG"}, + {GPIO_RSMRST_L_PGOOD, POWER_SIGNAL_ACTIVE_HIGH, "RSMRST_L"}, + {GPIO_PCH_SLP_S3_L, POWER_SIGNAL_ACTIVE_HIGH, "SLP_S3_DEASSERTED"}, + {GPIO_PCH_SLP_S4_L, POWER_SIGNAL_ACTIVE_HIGH, "SLP_S4_DEASSERTED"}, + {GPIO_SUSPWRNACK, POWER_SIGNAL_ACTIVE_HIGH, + "SUSPWRNACK_DEASSERTED"}, + + {GPIO_ALL_SYS_PGOOD, POWER_SIGNAL_ACTIVE_HIGH, "ALL_SYS_PGOOD"}, + {GPIO_PP3300_PG, POWER_SIGNAL_ACTIVE_HIGH, "PP3300_PG"}, + {GPIO_PP5000_PG, POWER_SIGNAL_ACTIVE_HIGH, "PP5000_PG"}, }; BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); |