]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: renesas: rzg2l: Add function pointer for PMC register write
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 30 May 2024 17:38:50 +0000 (18:38 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Jun 2024 07:46:40 +0000 (09:46 +0200)
commitede014cd1ea6422d7436bd0a1771fe0d7b0fe12a
tree35191113a3c0180e82bbe8dda029c943b65f3f11
parent14c32dc1f63d0de865e67c04c919ae036de20f87
pinctrl: renesas: rzg2l: Add function pointer for PMC register write

Introduces pmc_writeb() function pointer, in the struct
rzg2l_pinctrl_data to facilitate writing to the PMC register.  On the
RZ/V2H(P) SoC, unlocking the PWPR.REGWE_A bit before writing to PMC
registers is required, whereas this is not the case for the existing
RZ/G2L family.  This addition enables the reuse of existing code for
RZ/V2H(P).  Additionally, populate this function pointer with
appropriate data for existing SoCs.

Note that this functionality is only handled in rzg2l_gpio_request(), as
PMC unlock/lock during PFC setup will be taken care of in the
pwpr_pfc_lock_unlock() function pointer.

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-9-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c