diff options
author | Joseph Lo <josephl@nvidia.com> | 2016-12-16 20:57:36 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2017-02-13 12:29:42 +0300 |
commit | a9eb186e13144782232cc6fa731441be54baf505 (patch) | |
tree | 84516b09ee9f92af21eec842db5cd9efb85df9dc /include/linux/mfd/cros_ec.h | |
parent | 0f1747692ccc06fff9a5eb975b2a5cf92cec4030 (diff) | |
download | linux-a9eb186e13144782232cc6fa731441be54baf505.tar.xz |
mfd: cros_ec: Prevent data transfer while device is suspended
The cros_ec driver is still active while the device is suspended.
Besides that, it also tries to transfer data even after the I2C host had
been suspended. This patch uses a simple flag to prevent this.
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/cros_ec.h')
-rw-r--r-- | include/linux/mfd/cros_ec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h index f62043a75f43..7a01c94496f1 100644 --- a/include/linux/mfd/cros_ec.h +++ b/include/linux/mfd/cros_ec.h @@ -103,6 +103,7 @@ struct cros_ec_command { * @din_size: size of din buffer to allocate (zero to use static din) * @dout_size: size of dout buffer to allocate (zero to use static dout) * @wake_enabled: true if this device can wake the system from sleep + * @suspended: true if this device had been suspended * @cmd_xfer: send command to EC and get response * Returns the number of bytes received if the communication succeeded, but * that doesn't mean the EC was happy with the command. The caller @@ -136,6 +137,7 @@ struct cros_ec_device { int din_size; int dout_size; bool wake_enabled; + bool suspended; int (*cmd_xfer)(struct cros_ec_device *ec, struct cros_ec_command *msg); int (*pkt_xfer)(struct cros_ec_device *ec, |