iio: health: max30102: Add power enable parameter to get_temp function
authorPeter Meerwald-Stadler <pmeerw@pmeerw.net>
Fri, 27 Oct 2017 19:45:38 +0000 (21:45 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 2 Dec 2017 10:40:55 +0000 (10:40 +0000)
commita9c47abbdd71dceeaf1b923e5ce10e700e036905
tree6d95aaa8563ded1415b66c8f66e682710583363a
parent839a74cde7ee6da20ee908a570c0e88970ac13c9
iio: health: max30102: Add power enable parameter to get_temp function

Chip must not be in shutdown for reading temperature, so briefly leave
shutdown if buffer is not already running

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/health/max30102.c