summaryrefslogtreecommitdiff
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2022-11-17 11:01:30 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-03-11 12:18:28 +0000
commit390738596ccf565047f1db0c3c17753018da5196 (patch)
tree0300f968564d0ff12e68742e3a734f477274b566 /drivers/iio/dac
parentcd62d4f39a0de0c2936ecaae938ba444d77c902a (diff)
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>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/ad5592r-base.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
index 7a9b5fc1e579..076bc9ecfb49 100644
--- a/drivers/iio/dac/ad5592r-base.c
+++ b/drivers/iio/dac/ad5592r-base.c
@@ -124,6 +124,10 @@ static int ad5592r_gpio_request(struct gpio_chip *chip, unsigned offset)
return 0;
}
+static const char * const ad5592r_gpio_names[] = {
+ "GPIO0", "GPIO1", "GPIO2", "GPIO3", "GPIO4", "GPIO5", "GPIO6", "GPIO7",
+};
+
static int ad5592r_gpio_init(struct ad5592r_state *st)
{
if (!st->gpio_map)
@@ -140,6 +144,7 @@ static int ad5592r_gpio_init(struct ad5592r_state *st)
st->gpiochip.set = ad5592r_gpio_set;
st->gpiochip.request = ad5592r_gpio_request;
st->gpiochip.owner = THIS_MODULE;
+ st->gpiochip.names = ad5592r_gpio_names;
mutex_init(&st->gpio_lock);