Linus Walleij 9a9a369d61 iio: accel: kxsd9: Deploy system and runtime PM
This deploys runtime and system PM in the KXSD9 driver:

- Use the force_runtime_suspend/resume callbacks as system PM
  operations.

- Add buffer prepare/unprepare callbacks to grab the runtime
  PM while we're using buffered reads and put get/put_autosuspend
  in these.

- Insert get/put_autosuspend calls anywhere the IO is used from
  the raw read/write callbacks.

- Move the fullscale setting to be cached in the state container
  so we can restore it properly when coming back from
  system/runtime suspend.

- Set the autosuspend delay to two orders of magnitude that of
  the sensor start-up time (20ms) so we will autosuspend after
  2s.

- Register the callbacks in both the SPI and I2C subdrivers.

Tested with the I2C KXSD9 on the Qualcomm APQ8060 Dragonboard.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-18 11:35:59 +01:00
..
2016-09-06 11:02:36 -07:00
2016-09-07 21:24:42 -07:00
2016-09-09 14:52:05 -07:00
2016-07-30 21:01:36 -07:00
2016-09-03 10:40:57 -07:00
2016-08-15 16:41:46 +02:00
2016-07-30 21:01:36 -07:00
2016-08-04 09:59:37 -04:00
2016-08-01 18:36:01 -04:00
2016-07-20 23:39:36 -07:00
2016-09-11 14:41:49 -07:00
2016-09-03 11:38:43 -07:00
2016-08-12 14:59:10 +05:30
2016-08-06 00:01:33 -04:00
2016-08-05 09:48:22 -04:00
2016-09-06 11:06:52 -07:00
2016-08-01 18:36:01 -04:00
2016-09-09 15:11:35 +02:00
2016-08-02 19:35:40 -04:00
2016-08-06 09:20:13 -04:00