]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: ad7768-1: use devm_regulator_get_enable_read_voltage()
authorJonathan Santos <Jonathan.Santos@analog.com>
Sun, 24 Aug 2025 04:10:03 +0000 (01:10 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 14:34:20 +0000 (15:34 +0100)
commit91812d3843409c235f336f32f1c37ddc790f1e03
tree8e01e25c86ef79f4875133a7632e488359b02e13
parent681386fe5365591d044fe03d7ae05e5419a78d83
iio: adc: ad7768-1: use devm_regulator_get_enable_read_voltage()

Use devm_regulator_get_enable_read_voltage() function as a standard and
concise way of reading the voltage from the regulator and keep the
regulator enabled. Replace the regulator descriptor with the direct
voltage value in the device struct.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Link: https://patch.msgid.link/20250824041003.9727-1-Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7768-1.c