]> git.baikalelectronics.ru Git - kernel.git/commit
iio: cros_ec: Relax sampling frequency before suspending
authorGwendal Grignou <gwendal@chromium.org>
Wed, 21 Feb 2018 15:11:09 +0000 (16:11 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Mar 2018 15:02:58 +0000 (15:02 +0000)
commit2866be8eab44a9f71fa75f6afff1fa510e98710e
tree6a1f397e17e73163e41166a651fa2c1a0cbad7d4
parent5515a7896028bf3dd02496fe21484691b12b1867
iio: cros_ec: Relax sampling frequency before suspending

If an application set a tight sampling frequency, given the interrupt
use is a wakeup source, suspend will not happen: the kernel will receive
a wake up interrupt and will cancel the suspend process.

Given cros_ec sensors type is non wake up, this patch adds prepare and
complete callbacks to set 1s sampling period just before suspend. This
ensures the sensor hub will not be a source of interrupt during the
suspend process.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h
drivers/iio/light/cros_ec_light_prox.c