[PATCH 00/11] iio: use devm_regulator_get_enable_read_voltage round 6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series includes the last of the low-hanging fruit for converting
to devm_regulator_get_enable_read_voltage().

By low-hanging fruit, I mean that these are the drivers that read the
voltage of a regulator in the probe function. If you grep for this, you
will still find a few that do this, but in those cases, they usually
have power management where we need a handle to the regulator to power
things down and back up in suspend/resume. So we can't take advantage of
this helper function in those cases.

There is another class of drivers that could potentially make use of
this helper function that I haven't addressed. There are many drivers
that call regulator_get_voltage() in the IIO_CHAN_INFO_SCALE case of
the read_raw() callback. In most of these cases we could move the call
to regulator_get_voltage() to the probe function and store the value in
the private data structure instead. For those, we would need to be a bit
careful though to make sure the the intention wasn't to handle a change
in voltage during operation.

As a bonus, this series also includes a few other minor cleanups to fix
some copy/paste typos and remove some driver remove() callbacks.

---
David Lechner (11):
      iio: dac: ad5624r: fix struct name in doc comment
      iio: dac: ad5686: fix struct name in doc comment
      iio: dac: ad5686: use devm_regulator_get_enable_read_voltage()
      iio: dac: ad5686: drop driver remove function
      iio: dac: ad7293: use devm_regulator_get_enable_read_voltage()
      iio: dac: ad8801: use devm_regulator_get_enable_read_voltage()
      iio: dac ad8801: drop driver remove function
      iio: dac: ltc2632: use devm_regulator_get_enable_read_voltage()
      iio: dac ltc2632: drop driver remove function
      iio: dac: ltc2688: use devm_regulator_get_enable_read_voltage()
      iio: dac: max5821: use devm_regulator_get_enable_read_voltage()

 drivers/iio/dac/ad5624r.h    |  2 +-
 drivers/iio/dac/ad5686-spi.c |  6 ----
 drivers/iio/dac/ad5686.c     | 62 ++++++++-------------------------
 drivers/iio/dac/ad5686.h     |  6 +---
 drivers/iio/dac/ad5696-i2c.c |  6 ----
 drivers/iio/dac/ad7293.c     | 66 ++++++------------------------------
 drivers/iio/dac/ad8801.c     | 81 +++++++-------------------------------------
 drivers/iio/dac/ltc2632.c    | 69 +++++++++++--------------------------
 drivers/iio/dac/ltc2688.c    | 44 ++++++------------------
 drivers/iio/dac/max5821.c    | 36 +++-----------------
 10 files changed, 74 insertions(+), 304 deletions(-)
---
base-commit: 414c97c966b69e4a6ea7b32970fa166b2f9b9ef0
change-id: 20241120-iio-regulator-cleanup-round-6-78b05be06718

Best regards,
-- 
David Lechner <dlechner@xxxxxxxxxxxx>





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux