]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: renesas: rzg2l: Add function pointers for OEN register access
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 30 May 2024 17:38:51 +0000 (18:38 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Jun 2024 07:49:55 +0000 (09:49 +0200)
commit7d566a4d270c52ffffd04b78b753bb3ce8cbb867
tree9e1df525883bdc0c4d529e489f3f24aa12c96d60
parentede014cd1ea6422d7436bd0a1771fe0d7b0fe12a
pinctrl: renesas: rzg2l: Add function pointers for OEN register access

Introduce function pointers oen_read() and oen_write(), in the struct
rzg2l_pinctrl_data to facilitate reading and writing to the PFC_OEN
register.  On the RZ/V2H(P) SoC, unlocking the PWPR.REGWE_B bit before
writing to the PFC_OEN register is necessary, and the PFC_OEN register
has more bits compared to the RZ/G2L family.  To handle these
differences between RZ/G2L and RZ/V2H(P) and to reuse the existing code
for RZ/V2H(P), these function pointers are introduced.

Additionally, populate these function pointers with appropriate data for
existing SoCs.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
Link: https://lore.kernel.org/r/20240530173857.164073-10-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c