]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: ocelot: fix pinmuxing for pins after 31
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 20 Jun 2019 18:30:37 +0000 (20:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Jul 2019 07:01:58 +0000 (09:01 +0200)
commit8e9734fd9acb68d2d1c397b007062bbf7be4451e
tree7cb313cb1001b97a795fdeb78cdb2e97493eaaf3
parentfc8f20ce6167be49f58bb347c30ea143a016965a
pinctrl: ocelot: fix pinmuxing for pins after 31

[ Upstream commit 4b36082e2e09c2769710756390d54cfca563ed96 ]

The actual layout for OCELOT_GPIO_ALT[01] when there are more than 32 pins
is interleaved, i.e. OCELOT_GPIO_ALT0[0], OCELOT_GPIO_ALT1[0],
OCELOT_GPIO_ALT0[1], OCELOT_GPIO_ALT1[1]. Introduce a new REG_ALT macro to
facilitate the register offset calculation and use it where necessary.

Fixes: da801ab56ad8 pinctrl: ocelot: add MSCC Jaguar2 support
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-ocelot.c