mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
pinctrl: at91: make it work with current gpiolib
pinctrl-at91 currently does not support the gpio-groups devicetree property and has no pin-range. Because of this at91 gpios stopped working since patch commit2ab73c6d83
("gpio: Support GPIO controllers without pin-ranges") This was discussed in the patches commitfc328a7d1f
("gpio: Revert regression in sysfs-gpio (gpiolib.c)") commit56e337f2cf
("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") As a workaround manually set pin-range via gpiochip_add_pin_range() until a) pinctrl-at91 is reworked to support devicetree gpio-groups b) another solution as mentioned in commit56e337f2cf
("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") is found Signed-off-by: Thomas Blocher <thomas.blocher@ek-dev.de> Link: https://lore.kernel.org/5b992862-355d-f0de-cd3d-ff99e67a4ff1@ek-dev.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
b7fd103337
commit
752f387faa
@ -1403,8 +1403,11 @@ static int at91_pinctrl_probe(struct platform_device *pdev)
|
||||
|
||||
/* We will handle a range of GPIO pins */
|
||||
for (i = 0; i < gpio_banks; i++)
|
||||
if (gpio_chips[i])
|
||||
if (gpio_chips[i]) {
|
||||
pinctrl_add_gpio_range(info->pctl, &gpio_chips[i]->range);
|
||||
gpiochip_add_pin_range(&gpio_chips[i]->chip, dev_name(info->pctl->dev), 0,
|
||||
gpio_chips[i]->range.pin_base, gpio_chips[i]->range.npins);
|
||||
}
|
||||
|
||||
dev_info(dev, "initialized AT91 pinctrl driver\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user