[systemd-devel] [PATCH] logind: add standard gpio power button support

Lennart Poettering lennart at poettering.net
Fri Jul 31 03:12:37 PDT 2015


On Fri, 31.07.15 17:51, Kefeng Wang (wangkefeng.wang at huawei.com) wrote:

>   looking at parent device '/devices/platform/gpio_keys':
>     KERNELS=="gpio_keys"
>     SUBSYSTEMS=="platform"
>     DRIVERS=="gpio-keys"
>     ATTRS{keys}=="116"
>     ATTRS{switches}==""
>     ATTRS{driver_override}=="(null)"
>     ATTRS{disabled_keys}==""
>     ATTRS{disabled_switches}==""
> 
>   looking at parent device '/devices/platform':
>     KERNELS=="platform"
>     SUBSYSTEMS==""
>     DRIVERS==""
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang at huawei.com>

We do not do "S-o-b" on systemd. Please do not include this line in
your pacthes.

> ---
>  src/login/70-power-switch.rules |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules
> index 695d246..9299738 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*", SUBSYSTEMS=="platform", ATTRS{keys}=="116", TAG+="power-switch"

I am pretty sure this should include a DRIVERS=="gpio-keys" check,
since only then the "keys" attribute really makes sense.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list