Skip to content

Commit 034349a

Browse files
tariCommit Bot
authored andcommitted
zephyr/ap_pwrseq: use backward-compatible powerinfo format
servo tooling expects a particular format for output from the powerinfo command. This change modifies the ap_pwrseq implementation of the command to use the same format as the old implementation, to maintain compatibility with the outside tooling that depends on it. BUG=b:224657603 TEST=`powerinfo` output now has expected format BRANCH=none Signed-off-by: Peter Marheine <[email protected]> Change-Id: Ideeced578dc4f5bdb9c9513524b390f701452d3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3539774 Reviewed-by: Andrew McRae <[email protected]> Reviewed-by: Tanu Malhotra <[email protected]>
1 parent 4b2c8e2 commit 034349a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_console.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ static int powerinfo_handler(const struct shell *shell, size_t argc,
1616
int state;
1717

1818
state = pwr_sm_get_state();
19-
shell_fprintf(shell, SHELL_INFO, "Power state = %d (%s)\n",
20-
state, pwrsm_dbg[state]);
19+
shell_fprintf(shell, SHELL_INFO, "power state %d = %s, in 0x%04x\n",
20+
state, pwrsm_dbg[state], power_get_signals());
2121
return 0;
2222
}
2323

zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ LOG_MODULE_REGISTER(ap_pwrseq, CONFIG_AP_PWRSEQ_LOG_LEVEL);
2020
* @brief power_state names for debug
2121
*/
2222
const char pwrsm_dbg[][25] = {
23-
[SYS_POWER_STATE_G3] = "STATE_G3",
24-
[SYS_POWER_STATE_S5] = "STATE_S5",
25-
[SYS_POWER_STATE_S4] = "STATE_S4",
26-
[SYS_POWER_STATE_S3] = "STATE_S3",
27-
[SYS_POWER_STATE_S0] = "STATE_S0",
28-
[SYS_POWER_STATE_G3S5] = "STATE_G3S5",
29-
[SYS_POWER_STATE_S5S4] = "STATE_S5S4",
30-
[SYS_POWER_STATE_S4S3] = "STATE_S4S3",
31-
[SYS_POWER_STATE_S3S0] = "STATE_S3S0",
32-
[SYS_POWER_STATE_S5G3] = "STATE_S5G3",
33-
[SYS_POWER_STATE_S4S5] = "STATE_S4S5",
34-
[SYS_POWER_STATE_S3S4] = "STATE_S3S4",
35-
[SYS_POWER_STATE_S0S3] = "STATE_S0S3",
23+
[SYS_POWER_STATE_G3] = "G3",
24+
[SYS_POWER_STATE_S5] = "S5",
25+
[SYS_POWER_STATE_S4] = "S4",
26+
[SYS_POWER_STATE_S3] = "S3",
27+
[SYS_POWER_STATE_S0] = "S0",
28+
[SYS_POWER_STATE_G3S5] = "G3S5",
29+
[SYS_POWER_STATE_S5S4] = "S5S4",
30+
[SYS_POWER_STATE_S4S3] = "S4S3",
31+
[SYS_POWER_STATE_S3S0] = "S3S0",
32+
[SYS_POWER_STATE_S5G3] = "S5G3",
33+
[SYS_POWER_STATE_S4S5] = "S4S5",
34+
[SYS_POWER_STATE_S3S4] = "S3S4",
35+
[SYS_POWER_STATE_S0S3] = "S0S3",
3636
};
3737
#endif
3838

0 commit comments

Comments
 (0)