summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2021-07-28 07:12:52 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2021-07-29 20:41:32 +0300
commit0fb903914914a10b04dc8e5e5b09c8dca452ca91 (patch)
tree91af0d0c7c06a25fd377353c8d53c9a93b16c1ad /drivers/gpio
parent4e804c39f1be4498d80f379e5b7bc6d4f80f813c (diff)
downloadlinux-0fb903914914a10b04dc8e5e5b09c8dca452ca91.tar.xz
gpio: mt7621: support gpio-line-names property
This driver uses multiple gpiochip banks per device. To support 'gpio-line-names' along the banks 'offset' for each bank must be set explicitly. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-mt7621.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index 82fb20dca53a..5854a9343491 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -241,6 +241,7 @@ mediatek_gpio_bank_probe(struct device *dev,
if (!rg->chip.label)
return -ENOMEM;
+ rg->chip.offset = bank * MTK_BANK_WIDTH;
rg->irq_chip.name = dev_name(dev);
rg->irq_chip.parent_device = dev;
rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;