linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: xiangfu liu <xiangfu.z@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: how to make KEY_POWER work in terminal system
Date: Mon, 5 Oct 2009 22:06:33 -0700	[thread overview]
Message-ID: <20091006050633.GF27881@core.coreip.homeip.net> (raw)
In-Reply-To: <bc65a8d50910030942hecf96b2hc06ff18f786a1cc@mail.gmail.com>

Hi Xiangfu,

On Sun, Oct 04, 2009 at 12:42:07AM +0800, xiangfu liu wrote:
> kernel message:
> [    1.240000] input: gpio-keys as /devices/platform/gpio-keys/input/input0
> [    1.250000] input: matrix-keypad as /devices/platform/matrix-keypad/input/in1
> 
> no /dev/event/inputX device
> but there is
> /sys/devices/platform/gpio-keys/input/input0
> the uevent is :
> PRODUCT=19/1/1/100
> NAME="gpio-keys"
> PHYS="gpio-keys/input0"
> EV==3
> KEY==100000 0 0 0
> MODALIAS=input:b0019v0001p0001e0100-e0,1,k74,ramlsfw
> 
> from /proc/interrupts
> 181:         87     GPIO Bank D  Power
> 
> when I press the button nothing happen. device not poweroff.
> 
> we have a metrix-keypad in out device. all keys work find.
> so I try to map the "F1" to KEY_POWER. then I press the "F1" device not pwoeroff
> 

Powering off in response to KEY_POWER is a policy decision and thus
belongs to userspace. Someone (a program, a userspace daemon) has to
listen to events coming from the input devices and shut down the system
when it sees EV_KEY/KEY_POWER event.

I think you also want KEY_SLEEP, not KEY_POWER for your device...

-- 
Dmitry

  reply	other threads:[~2009-10-06  5:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-03 15:13 how to make KEY_POWER work in terminal system xiangfu liu
2009-10-03 16:42 ` xiangfu liu
2009-10-06  5:06   ` Dmitry Torokhov [this message]
     [not found]     ` <bc65a8d50910062032u1ab5d215xb37737b197bb7d46@mail.gmail.com>
     [not found]       ` <bc65a8d50910062033j5c2f86c4s2a17cb21cf16a7f7@mail.gmail.com>
2009-10-07  4:35         ` 回复: " Dmitry Torokhov
2009-10-08  3:46           ` xiangfu liu
2009-10-13 13:08           ` ??: " Xiangfu Liu
2009-10-14  6:12             ` Dmitry Torokhov

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=20091006050633.GF27881@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=xiangfu.z@gmail.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).