linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: hs@denx.de, linux-embedded@vger.kernel.org
Cc: Wolfgang Denk <wd@denx.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: GPIO triggers kernel reboot
Date: Sat, 25 Jan 2014 18:54:40 -0800	[thread overview]
Message-ID: <52E478F0.60903@gmail.com> (raw)
In-Reply-To: <52E3E031.6040709@denx.de>

Le 25/01/2014 08:02, Heiko Schocher a écrit :
> Hello all,
>
> is it possible to reboot current mainline kernel triggered from a
> GPIO in kernel space?
>
> If not, how can be done this, so that it has a chance to go into
> mainline?

Your GPIO could (should) be bound to a gpio-keys driver which will 
deliver key presses event; which you can ultimately bind to the action 
of triggering a system reboot.

Granted, this makes you cross a lot of layers, and requires user-space 
to implemnt the reboot policy, but what you are asking for is both a 
mechanism and policy mix, which is usually not accepted.

You are probably working with HW which won't change, but wiring a reset 
button to a system reset output is usually much simpler ;)

>
> Thanks for any suggestions
>
> bye,
> Heiko

  parent reply	other threads:[~2014-01-26  2:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-25 16:02 GPIO triggers kernel reboot Heiko Schocher
2014-01-25 19:11 ` Mehaffey, John
2014-01-25 20:24   ` Mehaffey, John
2014-01-27  6:17     ` Heiko Schocher
2014-01-26  2:54 ` Florian Fainelli [this message]
     [not found] ` <CALLGbRKK_ZcOB6nAiV67njrphXMQXN7Y2s81n5k3PWoSVrsrUw@mail.gmail.com>
2014-01-27  6:22   ` Heiko Schocher
2014-01-27  8:08     ` Arnaud Patard
2014-01-27  8:25       ` Geert Uytterhoeven

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=52E478F0.60903@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=hs@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=wd@denx.de \
    /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).