From: Sebastian Reichel <sre@kernel.org>
To: Tim Harvey <tharvey@gateworks.com>
Cc: linux-pm@vger.kernel.org, rtc-linux@googlegroups.com
Subject: Re: where in sysfs should I put the ability to power down a board for a specific time?
Date: Tue, 20 Oct 2015 23:21:27 +0200 [thread overview]
Message-ID: <20151020212127.GA25882@earth> (raw)
In-Reply-To: <CAJ+vNU3V-i2uJTpyE_swqjCvjVr+-j1+jjp+WuZLDA8Os74y=g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
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
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sre@kernel.org>
To: Tim Harvey <tharvey@gateworks.com>
Cc: linux-pm@vger.kernel.org, rtc-linux@googlegroups.com
Subject: [rtc-linux] Re: where in sysfs should I put the ability to power down a board for a specific time?
Date: Tue, 20 Oct 2015 23:21:27 +0200 [thread overview]
Message-ID: <20151020212127.GA25882@earth> (raw)
In-Reply-To: <CAJ+vNU3V-i2uJTpyE_swqjCvjVr+-j1+jjp+WuZLDA8Os74y=g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]
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
-- Sebastian
--
--
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-10-20 21:21 UTC|newest]
Thread overview: 9+ 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 [this message]
2015-10-20 21:21 ` [rtc-linux] " Sebastian Reichel
2015-10-24 2:12 ` Alexandre Belloni
2015-10-24 2:12 ` Alexandre Belloni
2015-10-27 14:55 ` Tim Harvey
2015-10-27 14:55 ` Tim Harvey
2015-10-27 15:29 ` Alexandre Belloni
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=20151020212127.GA25882@earth \
--to=sre@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--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 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.