iio: accel: fxls8962af: add wake on event
authorSean Nyekjaer <sean@geanix.com>
Mon, 20 Sep 2021 11:42:21 +0000 (13:42 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Oct 2021 07:27:32 +0000 (08:27 +0100)
commit269efcf0bbee582fa061fd7e4dfac05ee63e051b
tree26fd4ff4f060953a204e9a9efd3f24d378afdc92
parent131fb9f2b96f671679e49264ac4ae2f002e97074
iio: accel: fxls8962af: add wake on event

This adds ways for the SoC to wake from accelerometer wake events.

In the suspend function we skip disabling the sensor if wakeup-source
and events are activated.

If buffered reads are enabled they will be deactivated before suspend.
As the onboard buffer is only holding up to 32 12-bit X/Y/Z data
triplets.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210920114221.1595543-2-sean@geanix.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/fxls8962af-core.c