lkml.org 
[lkml]   [2022]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v6 0/3] iio: temperature: mlx90632: Add powermanagement
Date
From: Crt Mori <cmo@melexis.com>

As discussed previously on the group under the
"Controlling device power management from terminal" thread the mlx90632
sensor provides measurement capabilities under sleep_step mode. This
series runtime suspends the unused chip to sleep step mode to save power
but in case of continuous sequential reading it switches to continuous
mode for faster readouts. This value is hardcoded to
MLX90632_MEAS_MAX_TIME (with some buffer) and not user configurable.

The sensor runtime suspension is set to MLX90632_SLEEP_DELAY_MS which is
hardcoded to 3 times as much as MEAS_MAX_TIME.

Changes in v6:

- Revert changes to the suspend to prevent power mode regression

Changes in v5 (per review comments from Jonathan Cameron):

- Migrate to devm also for driver removal, along with putting it to low
power mode

Changes in v4 (per review comments from Jonathan Cameron):

- Migrate back to devm_pm_runtime_enable and remove the pm_disable function
- Remove pm stuff from remove and also sleep, since when iio device is
not registered also sleep makes no sense.
- Replace use EOPNOTSUPP as per checkpatch suggestion although some drivers
still use ENOTSUPP.
- Change the style of read frequency

Changes in v3 (per review comments from Jonathan Cameron):

- Change the "available" attribute presentation to more recent way
suggested
- Replace devm_pm_runtime_enable with enable and devm_add_action_or_reset
- When suspending device also put it to lower power mode in case there is
dummy regulator
- Use more switch cases instead of if/else

Changes in v2:

- apply review comments from Andy Shevchenko

Crt Mori (3):
iio: temperature: mlx90632 Add runtime powermanagement modes
iio: temperature: mlx90632 Read sampling frequency
iio: temperature: mlx90632 Change return value of sensor measurement
channel

drivers/iio/temperature/mlx90632.c | 440 ++++++++++++++++++++++++-----
1 file changed, 369 insertions(+), 71 deletions(-)

--
2.34.1

\
 
 \ /
  Last update: 2022-09-22 10:17    [W:0.085 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site