RE: [PATCH 2/2] rtc: isl1208: Balance enable_irq_wake() with disable_irq_wake() on cleanup
From: Biju Das
Date: Mon Apr 27 2026 - 02:07:59 EST
Hi Alexandre Belloni,
Thanks for the feedback.
> -----Original Message-----
> From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> Sent: 25 April 2026 19:37
> Subject: Re: [PATCH 2/2] rtc: isl1208: Balance enable_irq_wake() with disable_irq_wake() on cleanup
>
> On 25/04/2026 16:39:16+0000, Biju Das wrote:
> > Hi John,
> >
> > > -----Original Message-----
> > > From: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> > > Sent: 25 April 2026 16:50
> > > Subject: [PATCH 2/2] rtc: isl1208: Balance enable_irq_wake() with
> > > disable_irq_wake() on cleanup
> > >
> > > isl1208_setup_irq() calls enable_irq_wake() after a successful IRQ
> > > request, but the driver has no remove path that balances it.
> > > The driver is devm-only, so on unbind devm releases the IRQ - but
> > > enable_irq_wake() is not undone by IRQ release, so the wake count for that IRQ stays incremented.
> > >
> > > Each rebind therefore leaks one wake reference; the leak doubles for
> > > the chip variant that has a separate evdet IRQ, since
> > > isl1208_setup_irq() is then called twice during probe.
> >
> > Is removal of RTC device possible [1]?
> >
> > [1]
> > https://patchwork.ozlabs.org/project/rtc-linux/patch/20230922081208.26
> > 334-1-biju.das.jz@xxxxxxxxxxxxxx/#3195765
> >
>
> I'd say yes if this is not the RTC that is backing alarmtimer or alarmtimer is not compiled in the
> kernel.
obj-y += timeconv.o timecounter.o alarmtimer.o
Alarm timer is always compiled.
Now, On RZ/G3E SMARC EVK, only single RTC that have backing
alarmtimer support. On this platform, it cannot wake up the device
from deepsleep on RTC ALARM. But it can do timekeeping.
Cheers,
Biju