|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 492d7a3038b154e1813a1ece913a5a27148fec19 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Koen Kooi <koen@dominion.thruhere.net>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sat, 27 Sep 2014 09:55:44 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] logind: add support for TPS65217 Power Button
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
This PMIC is found on TI AM335x based boards like the beaglebone and
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
beaglebone black.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
root@beaglebone-white:~# udevadm info -a /dev/input/event0
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Udevadm info starts with the device specified by the devpath and then
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
walks up the chain of parent devices. It prints for every device
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
found, all possible attributes in the udev rules key format.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
A rule to match, can be composed by the attributes of the device
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
and the attributes from one single parent device.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
looking at device
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
'/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0/event0':
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
KERNEL=="event0"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEM=="input"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
DRIVER==""
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
looking at parent device
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
'/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0':
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
KERNELS=="input0"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEMS=="input"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
DRIVERS==""
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
ATTRS{name}=="tps65217_pwr_but"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
ATTRS{phys}==""
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
ATTRS{uniq}==""
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
ATTRS{properties}=="0"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0/0-0024':
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
KERNELS=="0-0024"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEMS=="i2c"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
DRIVERS=="tps65217"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
ATTRS{name}=="tps65217"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
looking at parent device '/devices/ocp.3/44e0b000.i2c/i2c-0':
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
KERNELS=="i2c-0"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEMS=="i2c"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
DRIVERS==""
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
ATTRS{name}=="OMAP I2C adapter"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
looking at parent device '/devices/ocp.3/44e0b000.i2c':
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
KERNELS=="44e0b000.i2c"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEMS=="platform"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
DRIVERS=="omap_i2c"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
looking at parent device '/devices/ocp.3':
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
KERNELS=="ocp.3"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEMS=="platform"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
DRIVERS==""
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/login/70-power-switch.rules | 1 +
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index a6997f7788..695d246370 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/login/70-power-switch.rules
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/login/70-power-switch.rules
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -10,5 +10,6 @@ ACTION=="remove", GOTO="power_switch_end"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
LABEL="power_switch_end"
|