All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/chrome: Add support for host sleep event command v1
@ 2019-03-20 21:20 Evan Green
  2019-03-20 21:20 ` [PATCH 1/2] mfd: cros_ec: Add host_sleep_event_v1 command Evan Green
  2019-03-20 21:20 ` [PATCH 2/2] platform/chrome: Add support for v1 of host sleep event Evan Green
  0 siblings, 2 replies; 8+ messages in thread
From: Evan Green @ 2019-03-20 21:20 UTC (permalink / raw)
  To: Benson Leung, Enric Balletbo i Serra
  Cc: Furquan Shaikh, Rajat Jain, Evan Green, linux-kernel,
	Guenter Roeck, Lee Jones

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.


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                   | 37 +++++++++++++---
 drivers/platform/chrome/cros_ec_proto.c |  9 ++++
 include/linux/mfd/cros_ec.h             |  2 +
 include/linux/mfd/cros_ec_commands.h    | 59 +++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 5 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-22 18:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 21:20 [PATCH 0/2] platform/chrome: Add support for host sleep event command v1 Evan Green
2019-03-20 21:20 ` [PATCH 1/2] mfd: cros_ec: Add host_sleep_event_v1 command Evan Green
2019-03-21 21:31   ` Enric Balletbo Serra
2019-03-22 15:37     ` Evan Green
2019-03-22 15:42       ` Enric Balletbo Serra
2019-03-20 21:20 ` [PATCH 2/2] platform/chrome: Add support for v1 of host sleep event Evan Green
2019-03-21 15:14   ` Guenter Roeck
2019-03-22 18:39     ` Evan Green

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.