]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ltc2309: use devm_regulator_get_enable_read_voltage()
authorDavid Lechner <dlechner@baylibre.com>
Fri, 21 Jun 2024 22:11:52 +0000 (17:11 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:51 +0000 (21:04 +0100)
commit890582c2a496d71aab53b3ff39fba1fd05fe9230
tree64d51e314477dcafa4e23fcf9dbdde25b9741a1f
parent95e17a54e4eb63f722be70c6488cf377cae8afc6
iio: adc: ltc2309: use devm_regulator_get_enable_read_voltage()

Use devm_regulator_get_enable_read_voltage() to simplify the code.
Error message is changed since there is only one error return now.
LTC2309_INTERNAL_REF_MV macro is added to make the internal reference
voltage value self-documenting.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-5-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ltc2309.c