mbox series

[00/14] IIO: More devm_regulator[_bulk]_get_enable() users

Message ID 20221016163409.320197-1-jic23@kernel.org (mailing list archive)
Headers show
Series IIO: More devm_regulator[_bulk]_get_enable() users | expand

Message

Jonathan Cameron Oct. 16, 2022, 4:33 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Also one general devm conversion that was too easy to ignore after
dealing with the regulators.

These new macros allow dropping of some boilerplate.  They are not
useful in many cases in IIO because they do not expose the
struct regulator, however for simple drivers that just turn the power
on at probe() they ensure that it is turned off again at remove.

Jonathan Cameron (14):
  iio: accel: adxl367: Use devm_regulator_bulk_get_enable()
  iio: accel: bma400: Use devm_regulator_bulk_get_enable()
  iio: accel: fxls8962af: Use devm_regulator_get_enable()
  iio: accel: kxcjk-1013: Use devm_regulator_bulk_get_enable()
  iio: accel: msa311: Use devm_regulator_get_enable()
  iio: cdc: ad7150: Use devm_regulator_get_enable()
  iio: st_sensors: core and lsm9ds0 switch to
    devm_regulator_bulk_get_enable()
  iio: frequency: ad9523: Use devm_regulator_get_enable()
  iio: humidity: hts211: Use devm_regulator_get_enable()
  iio: light: ltr501: Use devm_regulator_bulk_get_enable()
  iio: light: noa1305: Use devm_regulator_get_enable()
  iio: proximity: sx_common: Use devm_regulator_bulk_get_enable()
  iio: pressure: ms5611: Use devm_regulator_get_enable()
  iio: pressure: ms5611: Switch to fully devm_ managed registration.

 drivers/iio/accel/adxl367.c                   | 28 ++------
 drivers/iio/accel/bma400.h                    |  4 --
 drivers/iio/accel/bma400_core.c               | 29 ++-------
 drivers/iio/accel/fxls8962af-core.c           | 24 +------
 drivers/iio/accel/kxcjk-1013.c                | 25 ++-----
 drivers/iio/accel/msa311.c                    | 21 +-----
 drivers/iio/cdc/ad7150.c                      | 18 +----
 .../iio/common/st_sensors/st_sensors_core.c   | 39 ++---------
 drivers/iio/frequency/ad9523.c                | 22 +------
 drivers/iio/humidity/hts221.h                 |  2 -
 drivers/iio/humidity/hts221_core.c            | 27 ++------
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c  | 65 ++-----------------
 drivers/iio/light/ltr501.c                    | 27 ++------
 drivers/iio/light/noa1305.c                   | 26 +-------
 drivers/iio/pressure/ms5611.h                 |  4 --
 drivers/iio/pressure/ms5611_core.c            | 49 +++-----------
 drivers/iio/pressure/ms5611_i2c.c             |  6 --
 drivers/iio/pressure/ms5611_spi.c             |  6 --
 drivers/iio/proximity/sx_common.c             | 23 +------
 drivers/iio/proximity/sx_common.h             |  2 -
 include/linux/iio/common/st_sensors.h         |  4 --
 21 files changed, 57 insertions(+), 394 deletions(-)

Comments

Nuno Sa Oct. 17, 2022, 11:27 a.m. UTC | #1
> -----Original Message-----
> From: Jonathan Cameron <jic23@kernel.org>
> Sent: Sunday, October 16, 2022 6:34 PM
> To: linux-iio@vger.kernel.org
> Cc: Matti Vaittinen <mazziesaccount@gmail.com>; Matti Vaittinen
> <matti.vaittinen@fi.rohmeurope.com>; Tanislav, Cosmin
> <Cosmin.Tanislav@analog.com>; Jagath Jog J <jagathjog1996@gmail.com>;
> Sean Nyekjaer <sean@geanix.com>; Dmitry Rokosov
> <DDRokosov@sberdevices.ru>; Linus Walleij <linus.walleij@linaro.org>;
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>; Hennerich,
> Michael <Michael.Hennerich@analog.com>; Lorenzo Bianconi
> <lorenzo@kernel.org>; Martyn Welch <martyn.welch@collabora.com>;
> Gwendal Grignou <gwendal@chromium.org>; Stephen Boyd
> <swboyd@chromium.org>; Tomasz Duszynski <tduszyns@gmail.com>;
> Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Subject: [PATCH 00/14] IIO: More devm_regulator[_bulk]_get_enable()
> users
> 
> [External]
> 
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Also one general devm conversion that was too easy to ignore after
> dealing with the regulators.
> 
> These new macros allow dropping of some boilerplate.  They are not
> useful in many cases in IIO because they do not expose the
> struct regulator, however for simple drivers that just turn the power
> on at probe() they ensure that it is turned off again at remove.
> 
> Jonathan Cameron (14):
>   iio: accel: adxl367: Use devm_regulator_bulk_get_enable()
>   iio: accel: bma400: Use devm_regulator_bulk_get_enable()
>   iio: accel: fxls8962af: Use devm_regulator_get_enable()
>   iio: accel: kxcjk-1013: Use devm_regulator_bulk_get_enable()
>   iio: accel: msa311: Use devm_regulator_get_enable()
>   iio: cdc: ad7150: Use devm_regulator_get_enable()
>   iio: st_sensors: core and lsm9ds0 switch to
>     devm_regulator_bulk_get_enable()
>   iio: frequency: ad9523: Use devm_regulator_get_enable()
>   iio: humidity: hts211: Use devm_regulator_get_enable()
>   iio: light: ltr501: Use devm_regulator_bulk_get_enable()
>   iio: light: noa1305: Use devm_regulator_get_enable()
>   iio: proximity: sx_common: Use devm_regulator_bulk_get_enable()
>   iio: pressure: ms5611: Use devm_regulator_get_enable()
>   iio: pressure: ms5611: Switch to fully devm_ managed registration.
> 
>  drivers/iio/accel/adxl367.c                   | 28 ++------
>  drivers/iio/accel/bma400.h                    |  4 --
>  drivers/iio/accel/bma400_core.c               | 29 ++-------
>  drivers/iio/accel/fxls8962af-core.c           | 24 +------
>  drivers/iio/accel/kxcjk-1013.c                | 25 ++-----
>  drivers/iio/accel/msa311.c                    | 21 +-----
>  drivers/iio/cdc/ad7150.c                      | 18 +----
>  .../iio/common/st_sensors/st_sensors_core.c   | 39 ++---------
>  drivers/iio/frequency/ad9523.c                | 22 +------
>  drivers/iio/humidity/hts221.h                 |  2 -
>  drivers/iio/humidity/hts221_core.c            | 27 ++------
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c  | 65 ++-----------------
>  drivers/iio/light/ltr501.c                    | 27 ++------
>  drivers/iio/light/noa1305.c                   | 26 +-------
>  drivers/iio/pressure/ms5611.h                 |  4 --
>  drivers/iio/pressure/ms5611_core.c            | 49 +++-----------
>  drivers/iio/pressure/ms5611_i2c.c             |  6 --
>  drivers/iio/pressure/ms5611_spi.c             |  6 --
>  drivers/iio/proximity/sx_common.c             | 23 +------
>  drivers/iio/proximity/sx_common.h             |  2 -
>  include/linux/iio/common/st_sensors.h         |  4 --
>  21 files changed, 57 insertions(+), 394 deletions(-)
> 
> --
> 2.37.2

For all patches but patch 13/14,

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

For that one, you can add my tag after addressing Matti's comment.

- Nuno Sá
Jonathan Cameron Oct. 23, 2022, 1:03 p.m. UTC | #2
On Mon, 17 Oct 2022 11:27:18 +0000
"Sa, Nuno" <Nuno.Sa@analog.com> wrote:

> > -----Original Message-----
> > From: Jonathan Cameron <jic23@kernel.org>
> > Sent: Sunday, October 16, 2022 6:34 PM
> > To: linux-iio@vger.kernel.org
> > Cc: Matti Vaittinen <mazziesaccount@gmail.com>; Matti Vaittinen
> > <matti.vaittinen@fi.rohmeurope.com>; Tanislav, Cosmin
> > <Cosmin.Tanislav@analog.com>; Jagath Jog J <jagathjog1996@gmail.com>;
> > Sean Nyekjaer <sean@geanix.com>; Dmitry Rokosov
> > <DDRokosov@sberdevices.ru>; Linus Walleij <linus.walleij@linaro.org>;
> > Andy Shevchenko <andriy.shevchenko@linux.intel.com>; Hennerich,
> > Michael <Michael.Hennerich@analog.com>; Lorenzo Bianconi
> > <lorenzo@kernel.org>; Martyn Welch <martyn.welch@collabora.com>;
> > Gwendal Grignou <gwendal@chromium.org>; Stephen Boyd
> > <swboyd@chromium.org>; Tomasz Duszynski <tduszyns@gmail.com>;
> > Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Subject: [PATCH 00/14] IIO: More devm_regulator[_bulk]_get_enable()
> > users
> > 
> > [External]
> > 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Also one general devm conversion that was too easy to ignore after
> > dealing with the regulators.
> > 
> > These new macros allow dropping of some boilerplate.  They are not
> > useful in many cases in IIO because they do not expose the
> > struct regulator, however for simple drivers that just turn the power
> > on at probe() they ensure that it is turned off again at remove.
> > 
> > Jonathan Cameron (14):
> >   iio: accel: adxl367: Use devm_regulator_bulk_get_enable()
> >   iio: accel: bma400: Use devm_regulator_bulk_get_enable()
> >   iio: accel: fxls8962af: Use devm_regulator_get_enable()
> >   iio: accel: kxcjk-1013: Use devm_regulator_bulk_get_enable()
> >   iio: accel: msa311: Use devm_regulator_get_enable()
> >   iio: cdc: ad7150: Use devm_regulator_get_enable()
> >   iio: st_sensors: core and lsm9ds0 switch to
> >     devm_regulator_bulk_get_enable()
> >   iio: frequency: ad9523: Use devm_regulator_get_enable()
> >   iio: humidity: hts211: Use devm_regulator_get_enable()
> >   iio: light: ltr501: Use devm_regulator_bulk_get_enable()
> >   iio: light: noa1305: Use devm_regulator_get_enable()
> >   iio: proximity: sx_common: Use devm_regulator_bulk_get_enable()
> >   iio: pressure: ms5611: Use devm_regulator_get_enable()
> >   iio: pressure: ms5611: Switch to fully devm_ managed registration.
> > 
> >  drivers/iio/accel/adxl367.c                   | 28 ++------
> >  drivers/iio/accel/bma400.h                    |  4 --
> >  drivers/iio/accel/bma400_core.c               | 29 ++-------
> >  drivers/iio/accel/fxls8962af-core.c           | 24 +------
> >  drivers/iio/accel/kxcjk-1013.c                | 25 ++-----
> >  drivers/iio/accel/msa311.c                    | 21 +-----
> >  drivers/iio/cdc/ad7150.c                      | 18 +----
> >  .../iio/common/st_sensors/st_sensors_core.c   | 39 ++---------
> >  drivers/iio/frequency/ad9523.c                | 22 +------
> >  drivers/iio/humidity/hts221.h                 |  2 -
> >  drivers/iio/humidity/hts221_core.c            | 27 ++------
> >  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c  | 65 ++-----------------
> >  drivers/iio/light/ltr501.c                    | 27 ++------
> >  drivers/iio/light/noa1305.c                   | 26 +-------
> >  drivers/iio/pressure/ms5611.h                 |  4 --
> >  drivers/iio/pressure/ms5611_core.c            | 49 +++-----------
> >  drivers/iio/pressure/ms5611_i2c.c             |  6 --
> >  drivers/iio/pressure/ms5611_spi.c             |  6 --
> >  drivers/iio/proximity/sx_common.c             | 23 +------
> >  drivers/iio/proximity/sx_common.h             |  2 -
> >  include/linux/iio/common/st_sensors.h         |  4 --
> >  21 files changed, 57 insertions(+), 394 deletions(-)
> > 
> > --
> > 2.37.2  
> 
> For all patches but patch 13/14,
> 
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> 
> For that one, you can add my tag after addressing Matti's comment.
Tweaked the patch description on that one. The other comment is covered
in patch 14 as Matti observed in response to that one.

Applied to the togreg branch of iio.git and pushed out as testing.

Thanks,

Jonathan

> 
> - Nuno Sá