summaryrefslogtreecommitdiff
path: root/common/led_policy_std.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-11-22 20:55:14 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-28 15:44:19 -0800
commit126a303c69a77a7bf7317bc5778c68ed16ed326a (patch)
tree3b2ec69fc0132aeb5973b1fcfa4f6f17e226ad7e /common/led_policy_std.c
parent443207913b0490e004a87151ebf51f1b96140edd (diff)
downloadchrome-ec-126a303c69a77a7bf7317bc5778c68ed16ed326a.tar.gz
chipset: Introduce CHIPSET_STATE_ANY_SUSPEND
There are two different types of suspend states that are supported on x86 platforms -- S3 and S0ix. When AP enters S3, the chipset state is identified as CHIPSET_STATE_SUSPEND. On the other hand, when AP enters S0ix, the chipset state is identified as CHIPSET_STATE_STANDBY. There are several components within the EC e.g. charger state machine, usb pd task, motion sense task that take actions based on the chipset suspend state (and checked only for CHIPSET_STATE_SUSPEND until now). In order to ensure that different EC components do not have to worry about checking for all the different types of suspend states that are supported, introduce a new combination CHIPSET_STATE_ANY_SUSPEND which is a combination of CHIPSET_STATE_SUSPEND(S3) and CHIPSET_STATE_STANDBY(S0ix). BUG=b:69690699 BRANCH=None TEST=make -j buildall. Ruben verified that with this change, EC power consumption in S0ix drops from 7.85mW to 6.59mW on Soraka. Change-Id: I599a0ea2fe2f39132764a6068fa77c3aea02affa Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/786919 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'common/led_policy_std.c')
-rw-r--r--common/led_policy_std.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/led_policy_std.c b/common/led_policy_std.c
index 631d905754..e9fe4568a2 100644
--- a/common/led_policy_std.c
+++ b/common/led_policy_std.c
@@ -142,8 +142,7 @@ static void std_led_set_power(void)
pwr_led_set_color(LED_OFF);
else if (chipset_in_state(CHIPSET_STATE_ON))
pwr_led_set_color(LED_WHITE);
- else if (chipset_in_state(CHIPSET_STATE_SUSPEND |
- CHIPSET_STATE_STANDBY))
+ else if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND))
pwr_led_set_color((power_second & 3) ? LED_OFF : LED_WHITE);
}