Messages in this thread | | | From | Linus Walleij <> | Date | Sat, 28 Aug 2021 00:32:36 +0200 | Subject | Re: [PATCH v3 3/5] iio: st_sensors: remove st_sensors_power_disable() function |
| |
On Mon, Aug 23, 2021 at 1:22 PM Alexandru Ardelean <aardelean@deviqon.com> 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 <andy.shevchenko@gmail.com> > Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
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
| |