From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [rtc-linux] Re: [PATCH v4 0/4] pm: Add power off control
Date: Tue, 26 Nov 2013 10:22:46 -0300 [thread overview]
Message-ID: <20131126132245.GD2344@localhost> (raw)
In-Reply-To: <CANacCWxwr7s6ZvjWRbg_JGgc-Q1sJa-KJCLrSCK4BvSrmL5Eug@mail.gmail.com>
On Sat, Nov 23, 2013 at 12:23:35PM -0500, Vaibhav Bedia wrote:
> On Fri, Nov 22, 2013 at 2:50 PM, Ezequiel Garcia
> <ezequiel.garcia@free-electrons.com> wrote:
> [...]
> >
> > And why specifically *2* seconds, instead of *1* or *33* ?
> >
> > Sounds a bit like voodoo magic on this side :-)
>
> Consider the scenario where the actual time is 00:00:01.95 secs.
> Due to the 1 second resolution of the RTC, reading the registers
> would return 00:00:01. By the time we get to updating the
> RTC register for the shutdown by adding 1 sec (theoretically the
> smallest delta) we could end up programming the time that's already
> passed and in such cases the system will never shut down.
>
> 2 secs is the smallest delay that we can use to get the system
> to shutdown reliably.
>
> So it's not voodoo magic after all ;)
>
Right, thanks for the details.
Care to add the above explanation to a comment inside the driver?
That way, people won't ask this same question again :-)
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
prev parent reply other threads:[~2013-11-26 13:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 6:03 [PATCH v4 0/4] pm: Add power off control AnilKumar Ch
2012-12-14 6:03 ` [PATCH v4 1/4] rtc: OMAP: Add system pm_power_off to rtc driver AnilKumar Ch
2013-01-11 8:08 ` Russ Dill
2013-01-11 8:54 ` Russ Dill
2013-01-11 9:30 ` AnilKumar, Chimata
2013-01-11 9:55 ` AnilKumar, Chimata
2012-12-14 6:03 ` [PATCH v4 2/4] ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone AnilKumar Ch
2013-01-11 8:08 ` Russ Dill
2012-12-14 6:03 ` [PATCH v4 3/4] ARM: dts: AM33XX: Enable system power off control in am335x-bone AnilKumar Ch
2013-01-11 8:08 ` Russ Dill
2012-12-14 6:03 ` [PATCH v4 4/4] ARM: OMAP2+: omap2plus_defconfig: Enable RTC support AnilKumar Ch
2013-01-11 8:08 ` Russ Dill
2013-01-02 10:15 ` [PATCH v4 0/4] pm: Add power off control AnilKumar, Chimata
2013-01-11 8:09 ` Russ Dill
2013-11-22 19:50 ` Ezequiel Garcia
2013-11-23 17:23 ` [rtc-linux] " Vaibhav Bedia
2013-11-26 13:22 ` Ezequiel Garcia [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=20131126132245.GD2344@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).