linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [Discussion] how to implement external power down for ARM
Date: Wed, 6 May 2015 12:14:00 +0200	[thread overview]
Message-ID: <CAMJs5B_mmMDJQwWdd90W-sJmUrq_gBP8NBSTMNHMxU_mNHhJEQ@mail.gmail.com> (raw)
In-Reply-To: <5549CEAF.1090400@linaro.org>

On Wed, May 6, 2015 at 10:19 AM, Shannon Zhao <shannon.zhao@linaro.org> wrote:
>
> On 2015/5/6 15:29, Arnd Bergmann wrote:
>> On Wednesday 06 May 2015 14:56:58 Shannon Zhao wrote:
>>> > On 2015/5/5 19:13, Shannon Zhao wrote:
>>> >         gpio-keys {
>>> >                 autorepeat;
>>> >                 #address-cells = <0x1>;
>>> >                 #size-cells = <0x0>;
>>> >                 compatible = "gpio-keys";
>>> >
>>> >                 poweroff {
>>> >                         gpios = <0x8002 0x3 0x0>;
>>> >                         linux,code = <0x74>;
>>> >                         label = "GPIO Key Poweroff";
>>> >                 };
>>> >         };
>>> >
>>> > Configure kernel to select GPIO Buttons and Polled GPIO buttons. Use a
>>> > Redhat filesystem "Red Hat Enterprise Linux Server for ARM Development
>>> > Preview release 1.5" which has systemd and systemd-logind. Start VM and
>>> > when it starts well type "system_powerdown" on QEMU monitor, the guest
>>> > goes to poweroff. So this way works.
>> Ok, very good.
>>
>>> > Note: we must check the /lib/udev/rules.d/70-power-switch.rules in the
>>> > fs and add one following line in it if it doesn't exist.
>>> >
>>> > SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform",
>>> > ATTRS{keys}=="116", TAG+="power-switch"
>>> >
>>> > Then when execute journalctl -u systemd-logind in guest, we can see
>>> > something like below:
>>> >
>>> > Jan 01 00:01:02 localhost systemd[1]: Starting Login Service...
>>> > Jan 01 00:01:07 localhost systemd[1]: Started Login Service.
>>> > Jan 01 00:01:07 localhost systemd-logind[927]: Watching system buttons
>>> > on /dev/input/event0 (gpio-keys)
>>> > Jan 01 00:01:07 localhost systemd-logind[927]: New seat seat0.
>>> > Jan 01 00:01:25 localhost systemd-logind[927]: New session c1 of user root.
>>> >
>>> > Visit https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1347776 for
>>> > details.
>> How about Ubuntu or Debian releases that do not use systemd?
>>
>> I guess we should check with a Debian Wheezy or Ubuntu Trusty release.
>> My guess is that it will work fine, but some minor adjustment might
>> be needed.
>
> Will check Debian Wheezy and Ubuntu Trusty release later.
> BTW, I don't have them on hand, where can I get these filesystem for ARM?
>
Try this for Ubuntu trusty:
http://www.cs.columbia.edu/~cdall/linaro-trusty.tar.bz2

(It's a Linaro minimal FS so some things like manpages may be missing
for existing packages, let me know if you run into problems.)

-Christoffer

  parent reply	other threads:[~2015-05-06 10:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30  1:03 [Discussion] how to implement external power down for ARM Shannon Zhao
2015-04-30  8:03 ` Arnd Bergmann
2015-04-30  9:08   ` Peter Maydell
2015-04-30  9:19     ` Arnd Bergmann
2015-04-30  9:29     ` Mark Rutland
2015-04-30  9:56       ` Arnd Bergmann
2015-05-04  2:09         ` Shannon Zhao
2015-05-04 15:49           ` Arnd Bergmann
2015-05-05  2:57             ` Joel Stanley
2015-05-05  9:53               ` Arnd Bergmann
2015-05-05 10:51                 ` Christoffer Dall
2015-05-05 10:55                   ` Arnd Bergmann
2015-05-05 11:13                     ` Shannon Zhao
2015-05-06  6:56                       ` Shannon Zhao
2015-05-06  7:29                         ` Arnd Bergmann
2015-05-06  8:19                           ` Shannon Zhao
2015-05-06  8:37                             ` Arnd Bergmann
2015-05-06  8:41                               ` Shannon Zhao
2015-05-06 10:14                             ` Christoffer Dall [this message]
2015-05-07  2:39                           ` Shannon Zhao
2015-05-07  8:55                             ` Arnd Bergmann
2015-05-07  9:18                               ` Shannon Zhao
2015-05-07  9:43                                 ` Arnd Bergmann
2015-05-07 12:10                                   ` Shannon Zhao
2015-05-07 12:12                                     ` Peter Maydell
2015-05-07 12:18                                       ` Shannon Zhao
2015-05-07 12:34                                         ` Peter Maydell
2015-05-07 12:48                                           ` Arnd Bergmann
2015-05-07 13:02                                           ` Shannon Zhao
2015-04-30 13:38       ` Hanjun Guo
2015-05-04  1:55         ` Shannon Zhao

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=CAMJs5B_mmMDJQwWdd90W-sJmUrq_gBP8NBSTMNHMxU_mNHhJEQ@mail.gmail.com \
    --to=christoffer.dall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).