can gpio-keys send different codes on both rising and falling edge.

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

 



I have been able to use gpio-keys to create a key input which can
either suspend or wake my device using KEY_SLEEP and KEY_WAKEUP event
codes respectively, but not both.

I would like to use a single gpio to control this behavior.  On
falling edge the KEY_SLEEP would be emitted and the system would
suspend.  On the rising edge the KEY_WAKEUP would be emitted and the
system would resume.

Does a driver exist in input or elsewhere that can create this behavior for me?

I have not yet been able to find an existing driver for this use case.
I am considering creating a driver similar to gpio-keys that would
create this behavior.  Sleep and wake are my desired events but in a
general case one could emit any two codes on the rising/falling edges.

I examined some uses of SW_LID.  However what I found generally relied
on user space to perform the response action (suspend/resume) once the
lid event was emitted.  I would like this to be done completely in
kernel space.

Thank you,

Dexter



[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