Re: [systemd-devel] PATCH - add ARM based Chromebook lid switch

2013-04-12 Thread Koen Kooi

Op 12 apr. 2013, om 18:24 heeft Robert Schweikert rjsch...@suse.com het 
volgende geschreven:

 Thanks Kay for pointing me in the right direction
 
 
 From fced3673ee1001dc905206f9a92ea2062f951d3c Mon Sep 17 00:00:00 2001
 From: Robert Schweikert rjsch...@suse.com
 Date: Fri, 12 Apr 2013 12:08:16 -0400
 Subject: [PATCH] rules: add lid switch of ARM based Chromebook as a power
 switch to logind
 
 ---
 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..d925ab7 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*, KERNELS==gpio-keys.8, 
 TAG+=power-switch

Won't that trigger on every gpio-keys entry that devicetree labels as 8? I 
don't think it's a lid switch for all boards with gpio-keys.8 out there and 
even if it was, the .8 is just as stable as ethX, you shouldn't depend on it.

regards,

Koen
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] PATCH - add ARM based Chromebook lid switch

2013-04-12 Thread Cristian Rodríguez

El 12/04/13 13:24, Robert Schweikert escribió:

Thanks Kay for pointing me in the right direction


 From fced3673ee1001dc905206f9a92ea2062f951d3c Mon Sep 17 00:00:00 2001
From: Robert Schweikert rjsch...@suse.com
Date: Fri, 12 Apr 2013 12:08:16 -0400
Subject: [PATCH] rules: add lid switch of ARM based Chromebook as a power
  switch to logind

---
  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..d925ab7 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*, KERNELS==gpio-keys.8,
TAG+=power-switch

  LABEL=power_switch_end


Hrmm.. I think we need a vendor/device check here too.. otherwise it 
will trigger on other unrelated machines..

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] PATCH - add ARM based Chromebook lid switch

2013-04-12 Thread Kay Sievers
On Fri, Apr 12, 2013 at 10:58 PM, Cristian Rodríguez crrodrig...@opensuse.org

 +SUBSYSTEM==input, KERNEL==event*, KERNELS==gpio-keys.8,
 TAG+=power-switch

   LABEL=power_switch_end

 Hrmm.. I think we need a vendor/device check here too.. otherwise it will
 trigger on other unrelated machines..

Yeah, we cannot ship such generic things that way.

Does that box have any vendor/product information, which can be used
to identify the hardware? On x86 we have DMI data, but that is usually
not available on ARM.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel