diff options
| author | Guilherme Ivo Bozi <guilherme.bozi@usp.br> | 2026-04-05 18:37:26 -0300 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-27 09:58:23 +0100 |
| commit | 1ebc22b9b32fc4319538f95bd65f9dee5a5e6c38 (patch) | |
| tree | cafae10cf64ec24599320503ab9b4669952751d8 /tools/perf/scripts/python | |
| parent | 277a2d241c089fa885f734e6cf57f30883399571 (diff) | |
iio: adc: ad4170: use lookup table for gpio mask selection
Both ad4170_gpio_direction_input() and
ad4170_gpio_direction_output() duplicate the same switch
statement to map a GPIO offset to its corresponding mask.
Replace the switch with a static lookup table, simplifying the code
and avoiding duplication. This also makes future extensions easier.
No functional change intended.
Signed-off-by: Guilherme Ivo Bozi <guilherme.bozi@usp.br>
Acked-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
