Thread (5 messages) 5 messages, 3 authors, 2015-10-27

Re: [rtc-linux] Re: where in sysfs should I put the ability to power down a board for a specific time?

From: Alexandre Belloni <hidden>
Date: 2015-10-27 15:30:01
Also in: linux-rtc

Hi,

On 27/10/2015 at 07:55:28 -0700, Tim Harvey wrote :
The power-off process is a discrete step from setting the wakeup time.
By 'poweroff controller' I'm assuming you mean implement a
pm_power_off hook which makes sense.

While I'm at it it seems like implementing arm_pm_restart makes a lot
of sense as well as the device can toggle board power which should be
preferred over a chip-level reset.
Sure, then you can probably make an MFD which is the proper way of
register one device in multiple susbsytems. I just happened to give a
talk on that topic:

http://free-electrons.com/pub/conferences/2015/elce/belloni-mfd-regmap-syscon/belloni-mfd-regmap-syscon.pdf
I was looking for a standard userspace sysfs API in (ie
/sys/class/power?) that will call kernel_restart or kernel_power_off
but the only thing I've found is either the reboot syscall or sysrq (o
or b). Have I missed something or are these the expected userspace
API's for power-off/reset?
Yeah, I'm guessing this is the correct API, people usually use
halt/poweroff/shutdown/reboot which should all end up calling the reboot
system call.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help