OSDN Git Service

iio: temperature: mlx90632 Add runtime powermanagement modes
authorCrt Mori <cmo@melexis.com>
Thu, 22 Sep 2022 08:13:22 +0000 (10:13 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:43:56 +0000 (19:43 +0000)
commit2aebc223fc7ce613140ef2b64ca3c0f1a4f458cb
treebc463a0b2ce9f9b40db2f147905aab6e1234444f
parent2a22b40aea42dd516e669257ab5faf10396c2fad
iio: temperature: mlx90632 Add runtime powermanagement modes

The sensor can operate in lower power modes and even make measurements when
in those lower powered modes. The decision was taken that if measurement
is not requested within 2 seconds the sensor will remain in SLEEP_STEP
power mode, where measurements are triggered on request with setting the
start of measurement bit (SOB). In this mode the measurements are taking
a bit longer because we need to start it and complete it. Currently, in
continuous mode we read ready data and this mode is activated if sensor
measurement is requested within 2 seconds. The suspend timeout is
increased to 6 seconds (instead of 3 before), because that enables more
measurements in lower power mode (SLEEP_STEP), with the lowest refresh
rate (2 seconds).

Signed-off-by: Crt Mori <cmo@melexis.com>
Link: https://lore.kernel.org/r/be405068f081f2d518843897b13cd0289c280b5d.1663834141.git.cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/temperature/mlx90632.c