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>