linux/drivers/iio/addac
David Lechner 41b94bc6d9
iio: addac: ad74115: Use devm_regulator_get_enable_read_voltage()
We can reduce boilerplate code by using
devm_regulator_get_enable_read_voltage().

To maintain backwards compatibility in the case a DT does not provide
an avdd-supply, we fall back to calling devm_regulator_get_enable()
so that there is no change in user-facing behavior (e.g. dummy regulator
will still be in sysfs).

Also add an informative error message when we failed to get the voltage
and knowing the voltage is required while we are touching this.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240429-regulator-get-enable-get-votlage-v2-4-b1f11ab766c1@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 10:31:49 +09:00
..
ad74115.c iio: addac: ad74115: Use devm_regulator_get_enable_read_voltage() 2024-05-07 10:31:49 +09:00
ad74413r.c iio: addac: ad74413r: update channel function set 2023-09-13 20:00:50 +01:00
Kconfig IIO: 1st set of new device support, features and cleanup for 6.7 2023-10-20 07:54:15 +02:00
Makefile iio: addac: add AD74115 driver 2022-11-23 20:49:00 +00:00
stx104.c iio: addac: stx104: Add 8254 Counter/Timer support 2023-09-17 10:29:41 +01:00