pinctrl: renesas: rzg2l: Include pinmap in RZG2L_GPIO_PORT_PACK() macro
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Mon, 29 Jan 2024 13:55:54 +0000 (13:55 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 31 Jan 2024 10:28:56 +0000 (11:28 +0100)
commit15e4ae4f9ae74433e96331164e96f744769c0f8e
treeb19f7d90d2b8b07c53cedb3aa8ca1fa382d972c4
parent04d231b90e66fc013a85f556e4dbf19a2c3ef7ea
pinctrl: renesas: rzg2l: Include pinmap in RZG2L_GPIO_PORT_PACK() macro

Currently we assume all the port pins are sequential ie always PX_0 to
PX_n (n=1..7) exist, but on RZ/Five SoC we have additional pins P19_1 to
P28_5 which have holes in them, for example only one pin on port19 is
available and that is P19_1 and not P19_0. So to handle such cases
include pinmap for each port which would indicate the pin availability
on each port. As the pincount can be calculated based on pinmap drop this
from RZG2L_GPIO_PORT_PACK() macro.

Previously we had a max of 7 pins on each port but on RZ/Five Port-20
has 8 pins, so move the single pin configuration to BIT(63).

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240129135556.63466-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c