Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: iio: dac: ad5592r: add gpio_chip names

Add array of explicit gpio names for the `gpiochip` structure of
ad5592r, mainly for debug purposes.

Since the gpios are configurable via the dts, generic names are
used.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20221117090130.51702-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
39073859 cd62d4f3

+5
+5
drivers/iio/dac/ad5592r-base.c
··· 124 124 return 0; 125 125 } 126 126 127 + static const char * const ad5592r_gpio_names[] = { 128 + "GPIO0", "GPIO1", "GPIO2", "GPIO3", "GPIO4", "GPIO5", "GPIO6", "GPIO7", 129 + }; 130 + 127 131 static int ad5592r_gpio_init(struct ad5592r_state *st) 128 132 { 129 133 if (!st->gpio_map) ··· 144 140 st->gpiochip.set = ad5592r_gpio_set; 145 141 st->gpiochip.request = ad5592r_gpio_request; 146 142 st->gpiochip.owner = THIS_MODULE; 143 + st->gpiochip.names = ad5592r_gpio_names; 147 144 148 145 mutex_init(&st->gpio_lock); 149 146