lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241120-iio-regulator-cleanup-round-6-v1-0-d5a5360f7ec3@baylibre.com>
Date: Wed, 20 Nov 2024 15:33:23 -0600
From: David Lechner <dlechner@...libre.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Michael Hennerich <Michael.Hennerich@...log.com>, 
 Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, 
 Antoniu Miclaus <antoniu.miclaus@...log.com>, 
 Nuno Sá <nuno.sa@...log.com>, linux-iio@...r.kernel.org, 
 linux-kernel@...r.kernel.org, David Lechner <dlechner@...libre.com>
Subject: [PATCH 00/11] iio: use devm_regulator_get_enable_read_voltage
 round 6

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@...libre.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ