diff options
| author | David Lechner <dlechner@baylibre.com> | 2024-07-23 13:59:50 -0500 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-08-03 10:13:43 +0100 |
| commit | 8293a60cb5d14638bdca48b2d5aff0e39ef6212b (patch) | |
| tree | 2d668aed4e454647ef00f9db7022de8e8a5c32a5 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | iio: core: annotate masklength as __private (diff) | |
| download | linux-8293a60cb5d14638bdca48b2d5aff0e39ef6212b.tar.gz linux-8293a60cb5d14638bdca48b2d5aff0e39ef6212b.zip | |
iio: adc: mcp3564: use devm_regulator_get_enable_read_voltage()
This makes use of the new devm_regulator_get_enable_read_voltage()
helper function to reduce boilerplate code in the MCP3564 ADC driver.
The error message is slightly changed since there are fewer error
return paths.
Setting adc->vref_mv is consolidated into a single place to make the
logic easier to follow.
A use_internal_vref_attr local variable is added to make it more
obvious what the difference between the two iio info structures is.
The return value of the "Unknown Vref" dev_err_probe() is hard-coded to
-ENODEV instead of ret since it was getting a bit far from where ret
was set and logically that is the only value it could have.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Marius Cristea <marius.cristea@microchip.com>
Link: https://patch.msgid.link/20240723-iio-regulator-refactor-round-3-v2-1-ae9291201785@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
