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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:51 +0000 (08:42 +0100)
commit6af44accf4ffd300f0d77a170b18d8fe780f5dd6
treeccc986ec99fa0b46277e6ca56a26d13aea3f4ed1
parent975486d1f138c4c872265873cc2c868775ffd68c
iio: health: max30102: Add power enable parameter to get_temp function

[ Upstream commit a9c47abbdd71dceeaf1b923e5ce10e700e036905 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/health/max30102.c