All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Vaibhav Bedia <vaibhav.bedia@gmail.com>
Cc: rtc-linux@googlegroups.com, Russ Dill <Russ.Dill@ti.com>,
	"AnilKumar, Chimata" <anilkumar@ti.com>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	"tony@atomide.com" <tony@atomide.com>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
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

  reply	other threads:[~2013-11-26 13:23 UTC|newest]

Thread overview: 34+ 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 ` AnilKumar Ch
2012-12-14  6:03 ` [PATCH v4 1/4] rtc: OMAP: Add system pm_power_off to rtc driver AnilKumar Ch
2012-12-14  6:03   ` AnilKumar Ch
2013-01-11  8:08   ` Russ Dill
2013-01-11  8:08     ` Russ Dill
2013-01-11  8:54     ` Russ Dill
2013-01-11  8:54       ` Russ Dill
     [not found]       ` <CA+Bv8XaZzWindjhYnXLaqq5mJ6X0Hq=C7NUxW3aK3eh-d6ghtg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-11  9:30         ` AnilKumar, Chimata
2013-01-11  9:30           ` AnilKumar, Chimata
2013-01-11  9:55       ` AnilKumar, Chimata
2013-01-11  9:55         ` AnilKumar, Chimata
     [not found] ` <1355464997-19367-1-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-12-14  6:03   ` [PATCH v4 2/4] ARM: dts: AM33XX: Set pmic-shutdown-controller for BeagleBone AnilKumar Ch
2012-12-14  6:03     ` AnilKumar Ch
2013-01-11  8:08     ` Russ Dill
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
2012-12-14  6:03     ` AnilKumar Ch
2013-01-11  8:08     ` Russ Dill
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-02 10:15     ` AnilKumar, Chimata
2013-01-11  8:09     ` Russ Dill
2013-01-11  8:09       ` Russ Dill
2013-11-22 19:50       ` Ezequiel Garcia
2013-11-22 19:50         ` Ezequiel Garcia
2013-11-23 17:23         ` [rtc-linux] " Vaibhav Bedia
2013-11-23 17:23           ` Vaibhav Bedia
2013-11-26 13:22           ` Ezequiel Garcia [this message]
2013-11-26 13:22             ` Ezequiel Garcia
2012-12-14  6:03 ` [PATCH v4 4/4] ARM: OMAP2+: omap2plus_defconfig: Enable RTC support AnilKumar Ch
2012-12-14  6:03   ` AnilKumar Ch
2013-01-11  8:08   ` Russ Dill
2013-01-11  8:08     ` Russ Dill

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=Russ.Dill@ti.com \
    --cc=a.zummo@towertech.it \
    --cc=anilkumar@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.com \
    --cc=vaibhav.bedia@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.