[rtc-linux] Re: [PATCH v4 0/4] pm: Add power off control

Vaibhav Bedia vaibhav.bedia at gmail.com
Sat Nov 23 12:23:35 EST 2013


On Fri, Nov 22, 2013 at 2:50 PM, Ezequiel Garcia
<ezequiel.garcia at 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 ;)

Regards,
Vaibhav



More information about the linux-arm-kernel mailing list