From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Martin Hundebøll" <martin@geanix.com>
Cc: linux-rtc@vger.kernel.org, "Thomas Gleixner" <tglx@linutronix.de>,
"Alessandro Zummo" <a.zummo@towertech.it>,
"Sean Nyekjær" <sean@geanix.com>
Subject: Re: [RFC] rtc: class: register for late suspend / early resume
Date: Mon, 29 Jun 2020 23:54:31 +0200 [thread overview]
Message-ID: <20200629215431.GA3800@piout.net> (raw)
In-Reply-To: <20200610132403.2539519-1-martin@geanix.com>
Hi,
On 10/06/2020 15:24:03+0200, Martin Hundebøll wrote:
> When running on hardware with no persistent clock, and no non-stop
> clocksource, the timekeeping resume code relies on the rtc class to
> inject the suspend time.
>
> Other drivers might call into the timekeeping code to sync time in their
> devices. If such devices are resumed before the rtc class (and rtc is
> the only time source running in suspend) they currently get the
> pre-suspend time.
>
> Move the rtc class suspend/resume functions to be called late/early in
> the cycle to make sure timekeeping is synchronised when other devices
> are resumed.
>
> This works in our case on an i.MX6, where the rtc driver only has
> _suspend_noirq()/_resume_noirq(). I imagine it fails with drivers that
> has regular _suspend()/_resume() functions. Any hints are welcome.
>
Just to let you know that I've seen the previous thread and also this
patch. I'm not sure about the patch, especially regarding RTCs on an i2c
or SPI bus were wee need the bus to be suspended after the RTC and
resumed before the RTC. The order is properly handled when using
but I need to check whether it is correct when using _late. I remember
having issues with that with regulators.
I must admit my time is a bit scarce right now. Maybe you can get input
from the PM guys?
Regards,
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2020-06-29 21:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87k10habur.fsf () nanos ! tec ! linutronix ! de>
2020-06-10 13:24 ` [RFC] rtc: class: register for late suspend / early resume Martin Hundebøll
2020-06-29 21:54 ` Alexandre Belloni [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=20200629215431.GA3800@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=linux-rtc@vger.kernel.org \
--cc=martin@geanix.com \
--cc=sean@geanix.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).