From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: omap: wait for !BUSY before reading time for the power-off alarm
Date: Sun, 04 Oct 2026 22:07:32 +0000 [thread overview]
Message-ID: <20261004220732.BDE7D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261004215914.397512-1-rosenp@gmail.com>
> omap_rtc_power_off_program() reads the time registers to arm ALARM2
> one second ahead, but does not wait for STATUS.BUSY to clear first,
> unlike omap_rtc_read_time(). The time registers must not be accessed
> while BUSY is set, as the counters may be partway through an update.
>
> A read during an update can return, for example, seconds already
> wrapped to 0 with minutes still at the old value. The rollover check
> after arming only compares the seconds register, which no longer
> changes, so it passes and ALARM2 is armed for a time that has already
> passed. Power-off or rtc-only suspend then waits for an alarm that
> does not fire as intended.
>
> Call rtc_wait_not_busy() before the read, as omap_rtc_read_time()
> does. Both callers run with local interrupts disabled, as the access
> window requires.
>
> Fixes: 222a12fca604 ("rtc: omap: add support for pmic_power_en")
> Assisted-by: LLM
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261004215914.397512-1-rosenp@gmail.com?part=1
prev parent reply other threads:[~2026-10-04 22:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 21:59 [PATCH] rtc: omap: wait for !BUSY before reading time for the power-off alarm Rosen Penev
2026-10-04 22:07 ` 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=20261004220732.BDE7D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=rosenp@gmail.com \
--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