RE: [PATCH v3 1/6] pinctrl: renesas: rzg2l: Use raw_spinlock_irqsave() on power source update
From: Biju Das
Date: Fri Jun 05 2026 - 06:43:00 EST
Hi Geert,
> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: 05 June 2026 10:48
> Subject: Re: [PATCH v3 1/6] pinctrl: renesas: rzg2l: Use raw_spinlock_irqsave() on power source update
>
> Hi Biju,
>
> On Thu, 4 Jun 2026 at 12:58, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > > From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> > > Sent: 04 June 2026 10:49
> > > Subject: Re: [PATCH v3 1/6] pinctrl: renesas: rzg2l: Use
> > > raw_spinlock_irqsave() on power source update
> > >
> > > On Wed, 3 Jun 2026 at 17:17, Claudiu Beznea <claudiu.beznea@xxxxxxxxxx> wrote:
> > > > From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
> > > >
> > > > The rest of the driver uses
> > > > raw_spin_lock_irqsave()/raw_spin_unlock_irqrestore() for locking.
> > > > To avoid concurrency issues or deadlocks, use
> > > > raw_spinlock_irqsave() via the scoped_guard() helper for power source updates as well.
> >
> > Just a question, will rzg2l_set_power_source() called from IRQ context?
> >
> > This driver does not have IRQ. If any consumer calls
> > rzg2l_set_power_source() in IRQ contest?
> >
> > Have we seen any such dead locks/concurrency issue during any testing?
>
> All pin control drivers use the irqsave variants.
OK, then consistency point it make sense.
Cheers,
Biju