pinctrl: sunxi: Make some layout parameters dynamic
authorSamuel Holland <samuel@sholland.org>
Wed, 13 Jul 2022 02:52:32 +0000 (21:52 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 18 Jul 2022 09:39:33 +0000 (11:39 +0200)
commit622b681ef9d9e7d636108cda4e45a2a7695ebe92
treec55fd5e6388deb1ef966c72214e6470158a8ce2c
parent0bb95ae2672f9e00f471598a515bf4e9c2005046
pinctrl: sunxi: Make some layout parameters dynamic

Starting with the D1/D1s/T113 SoC, Allwinner changed the layout of the
pinctrl registers. This new layout widens the drive level field, which
affects the pull register offset and the overall bank size.

In order to support multiple register layouts, some of the layout
parameters need to be set based on the pinctrl variant. This requires
passing the pinctrl struct pointer to the register/offset calculation
functions.

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220713025233.27248-6-samuel@sholland.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunxi/pinctrl-sunxi.c
drivers/pinctrl/sunxi/pinctrl-sunxi.h