iio: srf04: add power management feature
authorAndreas Klinger <ak@it-klinger.de>
Mon, 20 Jan 2020 16:45:41 +0000 (17:45 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 14 Feb 2020 12:08:23 +0000 (12:08 +0000)
commit2251157b335b46bb3ea36994301f906e32e2d2b0
treeec529d9df1fee770c328135e5e0baf70a7d08ce3
parent66053d5d1b74be17b133775a4373888ba227e902
iio: srf04: add power management feature

Add suspend and resume operations for being used by optional power
management.

The suspend function is switching off an GPIO which can be used by the
hardware to switch power off. The resume function is switching the GPIO
on and sleeps an adjustable time to give the device a chance to be up
and running.

If activated the driver gets into autosuspend after some time of
inactivity.

Suggested-by: Franz Parzer <rpi-receiver@htl-steyr.ac.at>
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/srf04.c