linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Tim Harvey <tharvey@gateworks.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	linux-pm@vger.kernel.org, rtc-linux@googlegroups.com
Subject: Re: [rtc-linux] Re: where in sysfs should I put the ability to power down a board for a specific time?
Date: Tue, 27 Oct 2015 16:29:58 +0100	[thread overview]
Message-ID: <20151027152958.GE22331@piout.net> (raw)
In-Reply-To: <CAJ+vNU1vH2kr5snXiO2dCLcw=DViNLBtwxqsiAM4-xpMhu9w0w@mail.gmail.com>

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

      reply	other threads:[~2015-10-27 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 15:12 where in sysfs should I put the ability to power down a board for a specific time? Tim Harvey
2015-10-20 21:21 ` Sebastian Reichel
2015-10-24  2:12   ` [rtc-linux] " Alexandre Belloni
2015-10-27 14:55     ` Tim Harvey
2015-10-27 15:29       ` 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=20151027152958.GE22331@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sre@kernel.org \
    --cc=tharvey@gateworks.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 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).