RE: [PATCH] irqchip/renesas-rzv2h: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: 01 July 2025 14:05
> Subject: Re: [PATCH] irqchip/renesas-rzv2h: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
> 
> Hi Biju,
> 
> On Tue, 1 Jul 2025 at 12:59, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > The interrupt controller found on RZ/G3E doesn't provide any facility
> > to configure the wakeup sources. That's the reason why the driver
> > lacks the
> > irq_set_wake() callback for the interrupt chip.
> >
> > But this prevent to properly enter power management states like
> > "suspend to idle".
> >
> > Enable the flags IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND so
> > the interrupt suspend logic can handle the chip correctly.
> >
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> 
> Thanks for your patch!
> 
> > --- a/drivers/irqchip/irq-renesas-rzv2h.c
> > +++ b/drivers/irqchip/irq-renesas-rzv2h.c
> > @@ -427,7 +427,9 @@ static const struct irq_chip rzv2h_icu_chip = {
> >         .irq_retrigger          = irq_chip_retrigger_hierarchy,
> >         .irq_set_type           = rzv2h_icu_set_type,
> >         .irq_set_affinity       = irq_chip_set_affinity_parent,
> > -       .flags                  = IRQCHIP_SET_TYPE_MASKED,
> > +       .flags                  = IRQCHIP_MASK_ON_SUSPEND |
> > +                                 IRQCHIP_SET_TYPE_MASKED |
> > +                                 IRQCHIP_SKIP_SET_WAKE,
> 
> This driver uses Runtime PM (but does not use a platform driver[1]).
> So don't you need to implement .irq_set_wake() instead of setting IRQCHIP_SKIP_SET_WAKE(), so the ICU
> is kept running when it is part of the wake-up path (cfr.[2])?
> Does wake-up from an ICU interrupt work?

For STR state, there is no wakeup source. Wake up is only through the Power button.

For Suspend to idle state, ICU interrupt works. I have tested with USER_SW buttons
by adding wakeup-source in board dts.

Without these flags, currently system is not entering to sleep states.

[   38.539228] gpio-keys keys: failed to configure IRQ 48 as wakeup source: -38
[   38.539402] gpio-keys keys: PM: dpm_run_callback(): platform_pm_suspend returns -38
[   38.540299] gpio-keys keys: PM: failed to suspend: error -38

Cheers,
Biju




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux