mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
pinctrl: renesas: rzg2l: Acquire lock in rzg2l_pinctrl_pm_setup_pfc()
To keep consistency with rzg2l_pinctrl_set_pfc_mode(), acquire the lock in rzg2l_pinctrl_pm_setup_pfc() during PFC setup. 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-15-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
d930e8f783
commit
951eaac107
@ -2541,7 +2541,9 @@ static void rzg2l_pinctrl_pm_setup_dedicated_regs(struct rzg2l_pinctrl *pctrl, b
|
||||
static void rzg2l_pinctrl_pm_setup_pfc(struct rzg2l_pinctrl *pctrl)
|
||||
{
|
||||
u32 nports = pctrl->data->n_port_pins / RZG2L_PINS_PER_PORT;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&pctrl->lock, flags);
|
||||
pctrl->data->pwpr_pfc_lock_unlock(pctrl, false);
|
||||
|
||||
/* Restore port registers. */
|
||||
@ -2586,6 +2588,7 @@ static void rzg2l_pinctrl_pm_setup_pfc(struct rzg2l_pinctrl *pctrl)
|
||||
}
|
||||
|
||||
pctrl->data->pwpr_pfc_lock_unlock(pctrl, true);
|
||||
spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
}
|
||||
|
||||
static int rzg2l_pinctrl_suspend_noirq(struct device *dev)
|
||||
|
Loading…
Reference in New Issue
Block a user