Launchpad has imported 1 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=82347.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2014-08-08T13:01:28+00:00 dann frazier wrote:

There are a couple of ARM-based server systems that use the gpio-
keyboard and gpio-keyboard-polled drivers to send an event requesting a
shutdown. The following rules DTRT, though obviously it'd be nice if a
more generic (but still safe) rule could be devised.

SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", KERNELS
=="gpio-keys.6", PROGRAM="/bin/grep '^HP ProLiant m400 Server
Cartridge$' /proc/device-tree/model", TAG+="power-switch"


SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", 
KERNELS=="gpio_keys.12", ATTRS{keys}=="116", PROGRAM="/bin/cat 
/proc/device-tree/model", RESULT=="HP ProLiant m800 Server Cartridge", 
TAG+="power-switch"

You'll notice a couple of differences between the two. The m800 rule
specifies a key attribute where the m400 rule does not. This is because
the first uses a polled gpio via the gpio-keyboard-polled driver. This
driver does not expose a "keys" attribute in sysfs. The m400 uses the
gpio-keyboard driver, which does.

You'll also notice the grep vs. cat/RESULT methods. Not sure if upstream
has a preference.

It might make sense to drop the model/pin matching of the m800 rule, and
bind to any ATTR{keys}=="116" - this is defined as KEY_POWER in
<linux/input.h>. Of course, that won't help the -polled variant.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1347776/comments/9


** Changed in: systemd
       Status: Unknown => Confirmed

** Changed in: systemd
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1347776

Title:
  shutdown trigger on gpio_keys.X for armhf hardware

To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1347776/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to