mfd: cros_ec: Prevent data transfer while device is suspended
authorJoseph Lo <josephl@nvidia.com>
Fri, 16 Dec 2016 17:57:36 +0000 (18:57 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 13 Feb 2017 09:29:42 +0000 (09:29 +0000)
commita9eb186e13144782232cc6fa731441be54baf505
tree84516b09ee9f92af21eec842db5cd9efb85df9dc
parent0f1747692ccc06fff9a5eb975b2a5cf92cec4030
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>
drivers/mfd/cros_ec.c
drivers/platform/chrome/cros_ec_proto.c
include/linux/mfd/cros_ec.h