]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 25 Jun 2019 13:42:31 +0000 (15:42 +0200)
commitaa4e88f2559ab7e3e8378bc77a1b27dba2d6532a
tree22bdf79cd7ffdbc51ad283e704929c4dab384265
parent4ef5f6e1448ac58cb9f707d2ad75ddd50739cd54
pinctrl: ocelot: fix pinmuxing for pins after 31

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: 75b743bc01af pinctrl: ocelot: add MSCC Jaguar2 support
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-ocelot.c