Linux RTC
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Igor Velkov" <iav@iav.lv>
Cc: linux-rtc@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH RFC 2/3] alarmtimer: Choose the wakeup RTC by sleep state and priority
Date: Wed, 04 Nov 2026 06:03:38 +0000	[thread overview]
Message-ID: <sashiko-outbox-196719@kernel.org> (raw)
In-Reply-To: <20261104-b4-alarmtimer-rtc-priority-v1-2-e996681b8086@iav.lv>

> From: Igor Velkov <iav@iav.lv>
> 
> alarmtimer_rtc_add_device() registers a platform device under the first
> RTC that has an alarm and a wakeup-capable parent, and alarmtimer_suspend()
> programs that RTC. On ODROID-HC4 it is meson-vrtc, a register the firmware
> reads when the application processors suspend, with no interrupt in
> Linux, so an alarm set on it does not wake the board from s2idle; the
> board's pcf8563 registers later and is never used.
> 
> Keep each such RTC that no earlier registered one with at least the same
> priority already covers, each with its own platform device, and read
> linux,wakeup-states and linux,alarmtimer-priority from its parent. In
> alarmtimer_suspend() choose, among the RTCs whose linux,wakeup-states
> contains pm_suspend_target_state, the one with the highest priority,
> registered first among equals, and program the alarm from its platform
> device only. That platform device is a child of its RTC, so the driver
> core suspends it before the RTC. alarmtimer_resume() cancels the timer
> from the platform device that started it.
> 
> An RTC without linux,wakeup-states qualifies for every state; without
> linux,alarmtimer-priority its priority is 0. An RTC that an earlier
> registered one with at least the same priority beats for every state gets
> no platform device, so without the properties only the first RTC is kept.
> alarmtimer does not use an RTC that lists no suspend state, as with
> "none". hibernate and off count as no suspend state; nothing in this
> series acts on them.
> 
> alarmtimer_get_rtcdev() returns the RTC with the highest priority.
> 
> Signed-off-by: Igor Velkov <iav@iav.lv>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-b4-alarmtimer-rtc-priority-v1-0-e996681b8086@iav.lv?part=2


  reply	other threads:[~2026-11-04  6:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  5:54 [PATCH RFC 0/3] alarmtimer: Choose the wakeup RTC per sleep state from the device tree Igor Velkov via B4 Relay
2026-11-04  5:54 ` [PATCH RFC 1/3] dt-bindings: rtc: Add linux,wakeup-states and linux,alarmtimer-priority Igor Velkov via B4 Relay
2026-11-04  6:06   ` sashiko-bot
2026-11-04  5:54 ` [PATCH RFC 2/3] alarmtimer: Choose the wakeup RTC by sleep state and priority Igor Velkov via B4 Relay
2026-11-04  6:03   ` sashiko-bot [this message]
2026-11-04  5:54 ` [PATCH RFC 3/3] arm64: dts: amlogic: meson-sm1-odroid-hc4: Describe which RTC wakes the board Igor Velkov via B4 Relay
2026-11-04  6:01   ` sashiko-bot
2026-11-04  8:50 ` [PATCH RFC 0/3] alarmtimer: Choose the wakeup RTC per sleep state from the device tree Neil Armstrong
2026-11-04 18:38   ` Igor Velkov

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-196719@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=iav@iav.lv \
    --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