]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec: Always expose last resume result
authorStephen Boyd <swboyd@chromium.org>
Tue, 14 Jun 2022 07:57:26 +0000 (00:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:43 +0000 (14:23 +0200)
commitb898438cfb02d72291f63b91ccf6498c91214fd7
treeb5b1b2da95b9666b8e60086fefc7700e6d88175a
parent3b17f75c0098a8b04ec5eb0dbe6352495c748f3d
platform/chrome: cros_ec: Always expose last resume result

[ Upstream commit 7cdf4ce4d73c61a4571ce3da99dd9f66e1666a54 ]

The last resume result exposing logic in cros_ec_sleep_event()
incorrectly requires S0ix support, which doesn't work on ARM based
systems where S0ix doesn't exist. That's because cros_ec_sleep_event()
only reports the last resume result when the EC indicates the last sleep
event was an S0ix resume. On ARM systems, the last sleep event is always
S3 resume, but the EC can still detect sleep hang events in case some
other part of the AP is blocking sleep.

Always expose the last resume result if the EC supports it so that this
works on all devices regardless of S0ix support. This fixes sleep hang
detection on ARM based chromebooks like Trogdor.

Cc: Rajat Jain <rajatja@chromium.org>
Cc: Matthias Kaehlcke <mka@chromium.org>
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Fixes: e8a936107ac9 ("platform/chrome: Add support for v1 of host sleep event")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220614075726.2729987-1-swboyd@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/chrome/cros_ec.c