pinctrl: renesas: rzg2l: Add BUILD_BUG_ON() checks
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Mon, 2 Jan 2023 22:18:12 +0000 (22:18 +0000)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 26 Jan 2023 15:45:49 +0000 (16:45 +0100)
commit2d4a628cade2fe9cf7aa5629cffe768afe0e7ae1
treeb0fbb43e1b8c5a21eaf7eec4609f4273cbec7307
parent00dfe29887761405ccd23cc0aa07cb86623bb2b7
pinctrl: renesas: rzg2l: Add BUILD_BUG_ON() checks

Add BUILD_BUG_ON() checks to avoid overflows for GPIO configs for each
supported SoC.

While at it, for readability set n_port_pins based on the GPIO pin configs
and not on GPIO names for r9a07g044_data as done for r9a07g043_data.

Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230102221815.273719-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c