Thread (11 messages) 11 messages, 3 authors, 2021-08-29

Re: [PATCH v3 3/5] iio: st_sensors: remove st_sensors_power_disable() function

From: Linus Walleij <hidden>
Date: 2021-08-27 22:32:52
Also in: linux-iio

On Mon, Aug 23, 2021 at 1:22 PM Alexandru Ardelean
[off-list ref] wrote:
This change converts the st_sensors_power_enable() function to use
devm_add_action_or_reset() handlers to register regulator_disable hooks for
when the drivers get unloaded.

The parent device of the IIO device object is used. This is based on the
assumption that all other devm_ calls in the ST sensors use this reference.

This makes the st_sensors_power_disable() un-needed.
Removing this also changes unload order a bit, as all ST drivers would call
st_sensors_power_disable() first and iio_device_unregister() after that.

Reviewed-by: Andy Shevchenko <redacted>
Signed-off-by: Alexandru Ardelean <redacted>
Reviewed-by: Linus Walleij <redacted>

We should at some point add proper runtime PM to the ST sensors
(cf drivers/iio/gyro/mpu3050-core.c) but that can certainly be built
on top of this patch.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help