Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pinctrl: renesas: rzg2l: Fix save/restore of {IOLH,IEN,PUPD,SMT} registers

The rzg2l_pinctrl_pm_setup_regs() handles save/restore of
{IOLH,IEN,PUPD,SMT} registers during s2ram, but only for ports where all
pins share the same pincfg. Extend the code to also support ports with
variable pincfg per pin, so that {IOLH,IEN,PUPD,SMT} registers are
correctly saved and restored for all pins.

Fixes: 254203f9a94c ("pinctrl: renesas: rzg2l: Add suspend/resume support")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260326162459.101414-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

authored by

Biju Das and committed by
Geert Uytterhoeven
d9a60e36 494feecd

+7
+7
drivers/pinctrl/renesas/pinctrl-rzg2l.c
··· 3012 3012 off = RZG2L_PIN_CFG_TO_PORT_OFFSET(cfg); 3013 3013 pincnt = hweight8(FIELD_GET(PIN_CFG_PIN_MAP_MASK, cfg)); 3014 3014 3015 + if (cfg & RZG2L_VARIABLE_CFG) { 3016 + unsigned int pin = port * RZG2L_PINS_PER_PORT; 3017 + 3018 + for (unsigned int i = 0; i < RZG2L_PINS_PER_PORT; i++) 3019 + cfg |= *(u64 *)pctrl->desc.pins[pin + i].drv_data; 3020 + } 3021 + 3015 3022 caps = FIELD_GET(PIN_CFG_MASK, cfg); 3016 3023 has_iolh = !!(caps & (PIN_CFG_IOLH_A | PIN_CFG_IOLH_B | PIN_CFG_IOLH_C)); 3017 3024 has_ien = !!(caps & PIN_CFG_IEN);