Patch "pinctrl: ocelot: Fix alt mode for ocelot" has been added to the 6.1-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: ocelot: Fix alt mode for ocelot

to the 6.1-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-ocelot-fix-alt-mode-for-ocelot.patch
and it can be found in the queue-6.1 subdirectory.

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



commit beb227a7d14eede225bbf13eb4b0ab45b9741e4a
Author: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
Date:   Mon Feb 6 21:37:20 2023 +0100

    pinctrl: ocelot: Fix alt mode for ocelot
    
    [ Upstream commit 657fd9da2d4b4aa0a384105b236baa22fa0233bf ]
    
    In case the driver was trying to set an alternate mode for gpio
    0 or 32 then the mode was not set correctly. The reason is that
    there is computation error inside the function ocelot_pinmux_set_mux
    because in this case it was trying to shift to left by -1.
    Fix this by actually shifting the function bits and not the position.
    
    Fixes: 4b36082e2e09 ("pinctrl: ocelot: fix pinmuxing for pins after 31")
    Signed-off-by: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230206203720.1177718-1-horatiu.vultur@xxxxxxxxxxxxx
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 3d5995cbcb782..c1d58939dd89a 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1202,7 +1202,7 @@ static int ocelot_pinmux_set_mux(struct pinctrl_dev *pctldev,
 	regmap_update_bits(info->map, REG_ALT(0, info, pin->pin),
 			   BIT(p), f << p);
 	regmap_update_bits(info->map, REG_ALT(1, info, pin->pin),
-			   BIT(p), f << (p - 1));
+			   BIT(p), (f >> 1) << p);
 
 	return 0;
 }



[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