platform/chrome: Add support for v1 of host sleep event
authorEvan Green <evgreen@chromium.org>
Wed, 3 Apr 2019 21:34:28 +0000 (14:34 -0700)
committerLee Jones <lee.jones@linaro.org>
Tue, 14 May 2019 07:13:27 +0000 (08:13 +0100)
commit7235560ac77a2516b84b86946debaa4fb951ed9b
treeb0dd3de2e289e8b8b9ed6bc0ce376177b9cc36d9
parentafe2bb5c4b6227a347be60c70df2890c3f57553d
platform/chrome: Add support for v1 of host sleep event

Add support in code for the new forms of the host sleep event.
Detects the presence of this version of the command at runtime,
and use whichever form the EC supports. At this time, always
request the default timeout, and only report the failing response
via a WARN_ONCE(). Future versions could accept the sleep parameter
from outside the driver, and return the response information to
usermode or elsewhere.

Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Rajat Jain <rajatja@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/cros_ec.c
drivers/platform/chrome/cros_ec_proto.c
include/linux/mfd/cros_ec.h