Patch "pinctrl: at91: make it work with current gpiolib" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    pinctrl: at91: make it work with current gpiolib

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pinctrl-at91-make-it-work-with-current-gpiolib.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0ab6e75966cb53e3d8d527ad607c22312a8c49d0
Author: Thomas Blocher <thomas.blocher@xxxxxxxxx>
Date:   Wed Jul 31 01:16:26 2024 +0200

    pinctrl: at91: make it work with current gpiolib
    
    [ Upstream commit 752f387faaae0ae2e84d3f496922524785e77d60 ]
    
    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
    commit 2ab73c6d8323fa1e ("gpio: Support GPIO controllers without pin-ranges")
    This was discussed in the patches
    commit fc328a7d1fcce263 ("gpio: Revert regression in sysfs-gpio (gpiolib.c)")
    commit 56e337f2cf132632 ("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
    commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"")
    is found
    
    Signed-off-by: Thomas Blocher <thomas.blocher@xxxxxxxxx>
    Link: https://lore.kernel.org/5b992862-355d-f0de-cd3d-ff99e67a4ff1@xxxxxxxxx
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index ad01cc5798232..48374945b2d7b 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1290,8 +1290,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(&pdev->dev, "initialized AT91 pinctrl driver\n");
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux