Skip to content

Commit 9010bdf

Browse files
Josh-Tsaiquinchou77
authored andcommitted
fwk: cypd: update the power stat correctly
Commit 759a8f5 missed to add the #else to split the laptop or mini-pc feature. BRANCH=fwk-main BUG=cypdstatus show the wrong power stat (expected 0x0e, got 0x10) TEST=check the cypdstatus with AC+DC, the power stat gets 0x0e Signed-off-by: Josh Tsai <Josh_Tsai@compal.com> (cherry picked from commit d1c8f92)
1 parent 0079614 commit 9010bdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zephyr/program/framework/src/cypress_pd_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,9 +1172,9 @@ static void cypd_update_power_status(int controller)
11721172
(extpower_is_present() && controller != pd_controller_is_sink &&
11731173
prev_charge_port >= 0))
11741174
power_status |= CCG_POWERSTAT_EXT_POWER_PRESENT + CCG_POWERSTAT_EXT_POWER_TYPE;
1175-
#endif
1176-
1175+
#else
11771176
power_status = CCG_POWERSTAT_INTERNAL_POWER;
1177+
#endif
11781178

11791179
rv = cypd_write_reg8_wait_ack(controller, CCG_POWER_STAT, power_status);
11801180
if (rv != EC_SUCCESS) {

0 commit comments

Comments
 (0)