Linux RTC
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Aristo Chen" <aristo.chen@canonical.com>
Cc: linux-rtc@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v2] rtc: pcf2127: arm the alarm IRQ as a wake IRQ
Date: Wed, 21 Oct 2026 06:51:30 +0000	[thread overview]
Message-ID: <sashiko-outbox-179847@kernel.org> (raw)
In-Reply-To: <20261021064432.551943-1-aristo.chen@canonical.com>

> When an alarm IRQ is available, the driver calls device_init_wakeup(),
> so the RTC shows up as wakeup capable and enabled, but it never marks
> the IRQ itself as a wakeup interrupt. The PM core therefore disables
> the IRQ for the whole system suspend, and the alarm cannot wake the
> system: "rtcwake -m mem" on this RTC only resumes once another wakeup
> source fires.
> 
> On the i.MX93 11x11 FRDM board the PCF2131 alarm is routed through a
> PCAL6524 GPIO expander. Without a wakeup request on the expander pin,
> the expander's own interrupt is not armed for wakeup either, so the
> alarm never reaches the CPU. The BBNSM RTC on the same board uses
> devm_pm_set_wake_irq() and wakes the system as expected.
> 
> Register the alarm IRQ with devm_pm_set_wake_irq() so that the PM core
> arms it whenever the device may wake the system. A failure is not
> fatal: the RTC keeps working, only wakeup from it is unavailable.
> 
> The I2C core already sets up the wake IRQ before probe for clients
> flagged I2C_CLIENT_WAKE, which a "wakeup-source" DT property or a
> wake-capable ACPI interrupt sets. Those boards can already wake from
> the alarm, so skip the call for them: a second registration would only
> trigger a "wake irq already initialized" warning.
> 
> Fixes: 8a914bac44be ("rtc: pcf2127: add alarm support")
> Assisted-by: LLM
> Signed-off-by: Aristo Chen <aristo.chen@canonical.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261021064432.551943-1-aristo.chen@canonical.com?part=1


      reply	other threads:[~2026-10-21  6:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  6:44 [PATCH v2] rtc: pcf2127: arm the alarm IRQ as a wake IRQ Aristo Chen
2026-10-21  6:51 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-179847@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aristo.chen@canonical.com \
    --cc=linux-rtc@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox