systemd 216: add support for powerbutton on beagleboard, beaglebone and
gpio-keys Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
From 58d4aabedd415a735efeb8c2608ee73618c07f78 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 22 Sep 2014 22:14:39 -0400
|
||||
Subject: [PATCH 1/3] logind: add support for Triton2 Power Button
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=84201
|
||||
---
|
||||
src/login/70-power-switch.rules | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules
|
||||
index 36fb827..a6997f7 100644
|
||||
--- a/src/login/70-power-switch.rules
|
||||
+++ b/src/login/70-power-switch.rules
|
||||
@@ -9,5 +9,6 @@ ACTION=="remove", GOTO="power_switch_end"
|
||||
|
||||
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
|
||||
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
|
||||
|
||||
LABEL="power_switch_end"
|
||||
--
|
||||
1.9.0
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From 0c22189a9ecdff5bb38f9ea362caeea9e3902414 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sat, 27 Sep 2014 09:48:29 +0200
|
||||
Subject: [PATCH 2/3] logind: add support for TPS65217 Power Button
|
||||
|
||||
This PMIC is found on TI AM335x based boards like the beaglebone and
|
||||
beaglebone black.
|
||||
|
||||
root@beaglebone-white:~# udevadm info -a /dev/input/event0
|
||||
|
||||
Udevadm info starts with the device specified by the devpath and then
|
||||
walks up the chain of parent devices. It prints for every device
|
||||
found, all possible attributes in the udev rules key format.
|
||||
A rule to match, can be composed by the attributes of the device
|
||||
and the attributes from one single parent device.
|
||||
|
||||
looking at device
|
||||
'/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0/event0':
|
||||
KERNEL=="event0"
|
||||
SUBSYSTEM=="input"
|
||||
DRIVER==""
|
||||
|
||||
looking at parent device
|
||||
'/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0':
|
||||
KERNELS=="input0"
|
||||
SUBSYSTEMS=="input"
|
||||
DRIVERS==""
|
||||
ATTRS{name}=="tps65217_pwr_but"
|
||||
ATTRS{phys}==""
|
||||
ATTRS{uniq}==""
|
||||
ATTRS{properties}=="0"
|
||||
|
||||
looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024':
|
||||
KERNELS=="0-0024"
|
||||
SUBSYSTEMS=="i2c"
|
||||
DRIVERS=="tps65217"
|
||||
ATTRS{name}=="tps65217"
|
||||
|
||||
looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0':
|
||||
KERNELS=="i2c-0"
|
||||
SUBSYSTEMS=="i2c"
|
||||
DRIVERS==""
|
||||
ATTRS{name}=="OMAP I2C adapter"
|
||||
|
||||
looking at parent device '/devices/ocp.3/44e0b000.i2c':
|
||||
KERNELS=="44e0b000.i2c"
|
||||
SUBSYSTEMS=="platform"
|
||||
DRIVERS=="omap_i2c"
|
||||
|
||||
looking at parent device '/devices/ocp.3':
|
||||
KERNELS=="ocp.3"
|
||||
SUBSYSTEMS=="platform"
|
||||
DRIVERS==""
|
||||
---
|
||||
src/login/70-power-switch.rules | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules
|
||||
index a6997f7..695d246 100644
|
||||
--- a/src/login/70-power-switch.rules
|
||||
+++ b/src/login/70-power-switch.rules
|
||||
@@ -10,5 +10,6 @@ ACTION=="remove", GOTO="power_switch_end"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
|
||||
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch"
|
||||
|
||||
LABEL="power_switch_end"
|
||||
--
|
||||
1.9.0
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From c7f5cc647cd31c25e3beb66bf060160e084edd05 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Sat, 27 Sep 2014 09:50:57 +0200
|
||||
Subject: [PATCH 3/3] logind: add support for gpio-keys Power Button
|
||||
|
||||
This might be too broad since it will listen on *all* gpio-keys based
|
||||
input devices for a power button press, but such is life.
|
||||
|
||||
root@arietta-g25:~# udevadm info -a /dev/input/event0
|
||||
|
||||
Udevadm info starts with the device specified by the devpath and then
|
||||
walks up the chain of parent devices. It prints for every device
|
||||
found, all possible attributes in the udev rules key format.
|
||||
A rule to match, can be composed by the attributes of the device
|
||||
and the attributes from one single parent device.
|
||||
|
||||
looking at device '/devices/keys/input/input0/event0':
|
||||
KERNEL=="event0"
|
||||
SUBSYSTEM=="input"
|
||||
DRIVER==""
|
||||
|
||||
looking at parent device '/devices/keys/input/input0':
|
||||
KERNELS=="input0"
|
||||
SUBSYSTEMS=="input"
|
||||
DRIVERS==""
|
||||
ATTRS{name}=="keys"
|
||||
ATTRS{phys}=="gpio-keys/input0"
|
||||
ATTRS{uniq}==""
|
||||
ATTRS{properties}=="0"
|
||||
|
||||
looking at parent device '/devices/keys':
|
||||
KERNELS=="keys"
|
||||
SUBSYSTEMS=="platform"
|
||||
DRIVERS=="gpio-keys"
|
||||
ATTRS{keys}=="116"
|
||||
ATTRS{switches}==""
|
||||
ATTRS{driver_override}=="(null)"
|
||||
ATTRS{disabled_keys}==""
|
||||
ATTRS{disabled_switches}==""
|
||||
---
|
||||
src/login/70-power-switch.rules | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules
|
||||
index 695d246..7bbe096 100644
|
||||
--- a/src/login/70-power-switch.rules
|
||||
+++ b/src/login/70-power-switch.rules
|
||||
@@ -11,5 +11,6 @@ SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch"
|
||||
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="keys", TAG+="power-switch"
|
||||
|
||||
LABEL="power_switch_end"
|
||||
--
|
||||
1.9.0
|
||||
|
||||
@@ -33,6 +33,9 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
|
||||
file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \
|
||||
file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
|
||||
file://0001-configure-disable-LTO.patch \
|
||||
file://0001-logind-add-support-for-Triton2-Power-Button.patch \
|
||||
file://0002-logind-add-support-for-TPS65217-Power-Button.patch \
|
||||
file://0003-logind-add-support-for-gpio-keys-Power-Button.patch \
|
||||
file://touchscreen.rules \
|
||||
file://00-create-volatile.conf \
|
||||
file://init \
|
||||
|
||||
Reference in New Issue
Block a user