diff options
author | Andre Przywara <andre.przywara@arm.com> | 2022-09-05 18:12:39 +0100 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2023-10-22 23:40:57 +0100 |
commit | 30097ee3d23182aef08ff6eaf4a235eb8c365815 (patch) | |
tree | 8a382ec6aba1f65974464d2cfb5d2dc0336a8c61 /drivers/gpio/axp_gpio.c | |
parent | 316ec7ffbd52b3e3d7ddcb0618f231c1ded28bf2 (diff) |
pinctrl: sunxi: remove struct sunxi_gpio
So far every Allwinner SoC used the same basic pincontroller/GPIO
register frame, and just differed by the number of implemented banks and
pins, plus some special functionality from time to time. However the D1
and successors use a slightly different pinctrl register layout.
Use that opportunity to drop "struct sunxi_gpio", that described that
MMIO frame in a C struct. That approach is somewhat frowned upon in the
Linux world and rarely used there, though still popular with U-Boot.
Switching from a C struct to a "base address plus offset" approach allows
to switch between the two models more dynamically, without reverting to
preprocessor macros and #ifdef's.
Model the pinctrl MMIO register frame in the usual "base address +
offset" way, and replace a hard-to-parse CPP macro with a more readable
static function.
All the users get converted over. There are no functional changes at
this point, it just prepares the stages for the D1 and friends.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'drivers/gpio/axp_gpio.c')
0 files changed, 0 insertions, 0 deletions