From 126a303c69a77a7bf7317bc5778c68ed16ed326a Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 22 Nov 2017 20:55:14 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/786919 Reviewed-by: Aaron Durbin --- board/grunt/led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/grunt') diff --git a/board/grunt/led.c b/board/grunt/led.c index 5770252331..43e35848a0 100644 --- a/board/grunt/led.c +++ b/board/grunt/led.c @@ -157,7 +157,7 @@ static void led_set_power(void) suspend_ticks++; - if (chipset_in_state(CHIPSET_STATE_SUSPEND | CHIPSET_STATE_STANDBY)) { + if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND)) { if (!previous_state_suspend) suspend_ticks = 0; /* Blink once every four seconds. */ -- cgit v1.2.1