From ab2ad3f2f940199c289a889c3eedebc1b02a929b Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Thu, 17 Sep 2020 16:45:30 -0700 Subject: [PATCH] Fleex: Resume from suspend on critical battery This patch makes Fleex EC wake up AP from s0ix when the state of charge drops to 5%. Demonstrated as follows: 1. Boot Fleex. 2. Run powerd_dbus_suspend. 3. On EC, run battfake 5. 4. System resumes. BUG=b:163721887 BRANCH=Octopus TEST=Verified on Fleex: Signed-off-by: Daisuke Nojiri Change-Id: I4a998ad0aef5a7cfc6fd18995bde5571e6127e77 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45967 Tested-by: build bot (Jenkins) Reviewed-by: EricR Lai --- .../google/octopus/variants/fleex/include/variant/ec.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mainboard/google/octopus/variants/fleex/include/variant/ec.h b/src/mainboard/google/octopus/variants/fleex/include/variant/ec.h index 60c53dc649..29aee4f5ff 100644 --- a/src/mainboard/google/octopus/variants/fleex/include/variant/ec.h +++ b/src/mainboard/google/octopus/variants/fleex/include/variant/ec.h @@ -5,4 +5,9 @@ #include +#undef MAINBOARD_EC_S0IX_WAKE_EVENTS +#define MAINBOARD_EC_S0IX_WAKE_EVENTS \ + (MAINBOARD_EC_S3_WAKE_EVENTS |\ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL)) + #endif