]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: renesas: rzg2l: Refactor OEN register PWPR handling
authorJohn Madieu <john.madieu.xa@bp.renesas.com>
Thu, 6 Nov 2025 08:07:58 +0000 (09:07 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 13 Nov 2025 20:21:02 +0000 (21:21 +0100)
commit3b0cf6ab35909d7ac8d561e18159c62d42d914c2
tree09b0fb33728dda73f77f810e4d5fd427a7cb9b43
parent8903597df7b6d511f81abb47708a33e9a1e6a530
pinctrl: renesas: rzg2l: Refactor OEN register PWPR handling

Extract the OEN register write with PWPR protection logic into a helper
function to eliminate code duplication between rzg2l_write_oen() and
rzg2l_pinctrl_resume_noirq().

Introduce rzg2l_oen_write_with_pwpr() helper that encapsulates the
PWPR unlock, OEN register write, and PWPR lock sequence. This helper
must be called with pctrl->lock already held by the caller.

Reported-by: Pavel Machek <pavel@denx.de>
Closes: https://lore.kernel.org/cip-dev/OS9PR01MB16368C765305362F5F4132759FFC4A@OS9PR01MB16368.jpnprd01.prod.outlook.com/T/#u
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251106080758.36645-1-john.madieu.xa@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c