MANATEE: HACK: platform/chrome: ignore EC_HOST_RESUME_SLEEP_TIMEOUT

In ManaTEE, system may not be able to wakeup from idle sleep.

If the host can't enter s0ix during s2idle, CrOS EC sets
EC_HOST_RESUME_SLEEP_TIMEOUT flag in response to host event
HOST_SLEEP_EVENT_S0IX_RESUME.

Upon wakeup, powerd picks this up from cros_ec/last_resume_result in
sysfs, and tries to suspend the system again, for up to
/usr/share/power_manager/retry_suspend_attempts.

This patch ignores EC_HOST_RESUME_SLEEP_TIMEOUT flag to prevent powerd
from suspend retries.

Additional fix to call cros_ec_fixup_s0ixwake_mask() from CrOS guest
only.

BUG=b:228433429
TEST=idle suspend from powerd and able to wake up even if EC reports
suspend timeout.

Change-Id: Ia7030c8adadb9dbba1880851fe4706268f988fa5
Signed-off-by: Zide Chen <zide.chen@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3580223
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Dmytro Maluka <dmy@semihalf.com>
Commit-Queue: Dmitry Torokhov <dtor@chromium.org>
Tested-by: Dmitry Torokhov <dtor@chromium.org>
1 file changed