From: Evan Green <evgreen@chromium.org>
To: Benson Leung <bleung@chromium.org>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Furquan Shaikh <furquan@chromium.org>,
Rajat Jain <rajatja@chromium.org>,
Evan Green <evgreen@chromium.org>,
linux-kernel@vger.kernel.org, Guenter Roeck <groeck@chromium.org>,
Lee Jones <lee.jones@linaro.org>
Subject: [PATCH v3 0/2] platform/chrome: Add support for host sleep event command v1
Date: Wed, 3 Apr 2019 14:34:26 -0700 [thread overview]
Message-ID: <20190403213428.89920-1-evgreen@chromium.org> (raw)
The Chrome OS EC has an updated set of parameters for the host
sleep event command. With the new parameters, the host can indicate
a timeout along with suspend messages. Specifically S0ix suspend
messages are supported now, though the host command format isn't
specific to S0ix. When the EC sees an S0ix suspend host sleep event,
it arms a timer for the specified number of milliseconds (or a sane
per-board default baked into the EC). If the EC does not observe
the platform's SLP_S0 line assert within the specified timeout, then
the EC wakes the system.
On resume, the EC reports the number of transitions seen on the SLP_S0
line. The high bit is used to report whether or not a timeout occurred.
The number of transitions can then be used to detect cases of excessive
housekeeping activities, where the system wakes up out of S0ix temporarily
(unbeknownst to Linux), and then (hopefully) goes back to sleep.
This mechanism helps in cases where the system attempted to suspend
via S0ix, but due to driver bugs ended up suspending to a shallower
idle state instead. In concert with additional changes that detect
S0ix entry failures, this mechanism allows the system to quickly
detect and report on incorrect suspend outcomes.
Enric,
Gwendal informed me that his patch was rejected, so I'm sending this
as a standalone series rather than basing on top of his. The corresponding
EC code for this has now landed at:
https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1501512
Changes in v3:
- Consolidated boolean logic for host_sleep_v1 (Guenter)
Changes in v2:
- Made unions anonymous
- Replaced reserved union members with a comment
- Removed unnecessary version assignment (Guenter)
- Changed WARN to WARN_ONCE (Guenter)
- Fixed C code to use anonymous unions
- insize is only bigger for resume events.
Evan Green (2):
mfd: cros_ec: Add host_sleep_event_v1 command
platform/chrome: Add support for v1 of host sleep event
drivers/mfd/cros_ec.c | 39 ++++++++++++++---
drivers/platform/chrome/cros_ec_proto.c | 6 +++
include/linux/mfd/cros_ec.h | 2 +
include/linux/mfd/cros_ec_commands.h | 57 +++++++++++++++++++++++++
4 files changed, 99 insertions(+), 5 deletions(-)
--
2.20.1
next reply other threads:[~2019-04-03 21:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 21:34 Evan Green [this message]
2019-04-03 21:34 ` [PATCH v3 1/2] mfd: cros_ec: Add host_sleep_event_v1 command Evan Green
2019-04-04 8:23 ` Lee Jones
2019-04-04 14:42 ` Guenter Roeck
2019-04-04 18:38 ` Rajat Jain
2019-04-05 9:54 ` Enric Balletbo Serra
2019-05-08 7:10 ` Lee Jones
2019-04-03 21:34 ` [PATCH v3 2/2] platform/chrome: Add support for v1 of host sleep event Evan Green
2019-04-04 8:26 ` Lee Jones
2019-04-04 14:43 ` Guenter Roeck
2019-04-04 18:38 ` Rajat Jain
2019-04-05 9:57 ` Enric Balletbo Serra
2019-05-08 7:10 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403213428.89920-1-evgreen@chromium.org \
--to=evgreen@chromium.org \
--cc=bleung@chromium.org \
--cc=enric.balletbo@collabora.com \
--cc=furquan@chromium.org \
--cc=groeck@chromium.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rajatja@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®