Patch "pinctrl: sunxi: sunxi_pconf_set: use correct offset" has been added to the 5.18-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: sunxi: sunxi_pconf_set: use correct offset

to the 5.18-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-sunxi-sunxi_pconf_set-use-correct-offset.patch
and it can be found in the queue-5.18 subdirectory.

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



commit 7a387990ae9485846d878dc2ab123fac5f4a1575
Author: Andrei Lalaev <andrey.lalaev@xxxxxxxxx>
Date:   Wed May 25 22:04:25 2022 +0300

    pinctrl: sunxi: sunxi_pconf_set: use correct offset
    
    [ Upstream commit cd4c1e65a32afd003b08ad4aafe1e4d3e4e8e61b ]
    
    Some Allwinner SoCs have 2 pinctrls (PIO and R_PIO).
    Previous implementation used absolute pin numbering and it was incorrect
    for R_PIO pinctrl.
    It's necessary to take into account the base pin number.
    
    Fixes: 90be64e27621 ("pinctrl: sunxi: implement pin_config_set")
    Signed-off-by: Andrei Lalaev <andrey.lalaev@xxxxxxxxx>
    Reviewed-by: Samuel Holland <samuel@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220525190423.410609-1-andrey.lalaev@xxxxxxxxx
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index d9327d7d56ee..dd928402af99 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -544,6 +544,8 @@ static int sunxi_pconf_set(struct pinctrl_dev *pctldev, unsigned pin,
 	struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
 	int i;
 
+	pin -= pctl->desc->pin_base;
+
 	for (i = 0; i < num_configs; i++) {
 		enum pin_config_param param;
 		unsigned long flags;



[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