a question about lid input device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux