public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* a question about lid input device
@ 2010-06-13  6:53 Zhang Rui
  2010-06-14  2:01 ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 19+ messages in thread
From: Zhang Rui @ 2010-06-13  6:53 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-acpi@vger.kernel.org, Brown, Len, Zhang, Rui

Hi, Dmitry,

I have a question about the ACPI lid button input device.

By reading commit c0968f0e, I think the acpi lid button is registered as
a switch (EV_SW set), and the lid status is reported via SW_LID bit,
e.g. lid closed when SW_LID is set and vice versa.
Then we update the lid switch status when a Lid notification comes.
right?

Then, IMO, userspace can get the lid status
via /sys/class/input/inputX/uevent, right?

here is a the output of this file on my laptop,
/sys/class/input/input1/modalias:input:b0019v0000p0005e0000-e0,5,kramlsfw0,
/sys/class/input/input1/name:Lid Switch
/sys/class/input/input1/phys:PNP0C0D/button/input0
/sys/class/input/input1/uevent:PRODUCT=19/0/5/0
/sys/class/input/input1/uevent:NAME="Lid Switch"
/sys/class/input/input1/uevent:PHYS="PNP0C0D/button/input0"
/sys/class/input/input1/uevent:EV==21
/sys/class/input/input1/uevent:SW==1
/sys/class/input/input1/uevent:MODALIAS=input:b0019v0000p0005e0000-e0,5,kramlsfw0,

Lid is opened but SW is set, I tried to close/open the lid and found
that this bit never changes. is there something I misunderstand? can we
get the lid status in userspace?

thanks,
rui


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-09-29  1:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13  6:53 a question about lid input device Zhang Rui
2010-06-14  2:01 ` Henrique de Moraes Holschuh
2010-06-22  1:56   ` Len Brown
2010-07-04  8:35     ` Dmitry Torokhov
2010-07-05  1:09       ` Zhang Rui
2010-07-05  1:28         ` Dmitry Torokhov
2010-07-05  1:47           ` Zhang Rui
2010-07-05 19:49             ` Henrique de Moraes Holschuh
2010-07-05 20:04               ` Paul Fox
2010-07-05 20:27               ` Dmitry Torokhov
2010-07-07  3:08                 ` Zhang Rui
2010-07-07  5:36                   ` Dmitry Torokhov
2010-07-07 15:14   ` Paul Fox
2010-07-07 16:25     ` Dmitry Torokhov
2010-07-07 16:51       ` Paul Fox
2010-07-07 17:01         ` Dmitry Torokhov
2010-07-07 17:08           ` Paul Fox
2010-07-07 17:19             ` Dmitry Torokhov
2010-09-29  1:12       ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox