Skip to content

Commit cea9501

Browse files
bijudasgeertu
authored andcommitted
pinctrl: renesas: rzg2l: Fix PMC restore
PMC restore needs unlocking the register using the PWPR register. Fixes: ede014c ("pinctrl: renesas: rzg2l: Add function pointer for PMC register write") Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20250921111557.103069-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent fea997d commit cea9501

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3016,7 +3016,11 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
30163016
* Now cache the registers or set them in the order suggested by
30173017
* HW manual (section "Operation for GPIO Function").
30183018
*/
3019-
RZG2L_PCTRL_REG_ACCESS8(suspend, pctrl->base + PMC(off), cache->pmc[port]);
3019+
if (suspend)
3020+
RZG2L_PCTRL_REG_ACCESS8(suspend, pctrl->base + PMC(off), cache->pmc[port]);
3021+
else
3022+
pctrl->data->pmc_writeb(pctrl, cache->pmc[port], PMC(off));
3023+
30203024
if (has_iolh) {
30213025
RZG2L_PCTRL_REG_ACCESS32(suspend, pctrl->base + IOLH(off),
30223026
cache->iolh[0][port]);

0 commit comments

Comments
 (0)