From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Tim Harvey <tharvey@gateworks.com>,
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: Sat, 24 Oct 2015 04:12:11 +0200 [thread overview]
Message-ID: <20151024021211.GA8105@piout.net> (raw)
In-Reply-To: <20151020212127.GA25882@earth>
Hi,
On 20/10/2015 at 23:21:27 +0200, Sebastian Reichel wrote :
> Hi,
>
> On Tue, Oct 20, 2015 at 08:12:09AM -0700, Tim Harvey wrote:
> > There is a system controller [1] on a set of embedded boards I support
> > that allows disabling the board's primary power supply. It can disable
> > it (until a physical pushbutton event occurs) and/or disable it for a
> > certain number of seconds (up to 2^16 seconds).
> >
> > I've been in the process of writing a mfd driver to fully support this
> > device and I'm a bit stumped on how to handle the power management
> > capabilities.
> >
> > What is the correct API for this type of device in sysfs? I'm thinking
> > it needs a power-supply class driver, but after looking over the docs
> > and code I'm not seeing examples of similar devices. Can anyone point
> > me to an example or provide some suggestions?
>
> Usually this is an RTC feature exposed as wakealarm. See for example
> this article for the description of the userspace interface:
>
> https://www.linux.com/learn/docs/672849-wake-up-linux-with-an-rtc-alarm-clock
Indeed, if you can set the time, then shutdown in two discreet steps,
then you can probably expose an alarm and a poweroff controller.
If there is only one step involved, then this will not fit well in any
subsystem but I guess it makes more sense to put it in the RTC
subsystem as it has all the utilities to handle dates and times.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2015-10-24 2:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJ+vNU3V-i2uJTpyE_swqjCvjVr+-j1+jjp+WuZLDA8Os74y=g@mail.gmail.com>
2015-10-20 21:21 ` [rtc-linux] Re: where in sysfs should I put the ability to power down a board for a specific time? Sebastian Reichel
2015-10-24 2:12 ` Alexandre Belloni [this message]
2015-10-27 14:55 ` Tim Harvey
2015-10-27 15:29 ` Alexandre Belloni
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=20151024021211.GA8105@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