Re: how to make KEY_POWER work in terminal system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux