Am 23.10.2018 um 02:10 schrieb Michael Mrozek EvilDragon@openpandora.org:
On Di, 2018-10-23 at 01:50 +0200, Michael Mrozek wrote:
Thanks to aTcs help, I know it's event2.
Beware: the mapping of event numbers is not stable. It depends on random sequence how drivers are loaded. The correct way to map them by udev rules to stable file names:
http://git.goldelico.com/?p=letux-kernel.git;a=blob;f=Letux/etc/udev/rules.d...
Alternatively you have to scan /sys/class/input for a device name and take the event number shown there.
something like
function findinput () { for i in /sys/class/input/input* do if [ "$(cat $i/name)" = "$1" ] then echo $i/event* return fi done }
Maybe we should also add proper udev rules for the lid sensor event to map it to /dev/input/lid.
However, I was not able to trigger the switch with a magnet as well. I can test it on a few more units, but as we already have a few where it's not working, I doubt this will make a difference.
@Nikolaus: Could you check the switch still works fine with your latest prototype?
I have tried with
evtest --query /dev/input/event2 EV_SW 0 && echo on || echo off
but also no success.
Could this be a misconfiguration in the board file?
Yes. There may something have become broken (pull-up/down?). I will evaluate.
On Mo, 2018-10-15 at 11:37 +0200, H. Nikolaus Schaller wrote:
I now wanted to check the lid switch with evtest.
evtest shows the following devices on our OS:
/dev/input/event0: user-button /dev/input/event1: pyra-gpio-keys@1 /dev/input/event2: pyra-gpio-keys@2
^^^ maybe we should define better names...
/dev/input/event3: palmas_pwron /dev/input/event4: tca8418 /dev/input/event5: TSC2007 Touchscreen /dev/input/event6: nub0 /dev/input/event7: nub1 /dev/input/event8: accelerometer-iio-input-bridge /dev/input/event9: twl6040:vibrator /dev/input/event10: pyraInput keyboard /dev/input/event11: pyraInput Gamepad /dev/input/event12: pyraInput Mouse
Which one do I use for the lid switch?
- lid switch isn't working (old unit too)
Okay, this is something we need to check. Have you tried triggering the lid switch with the lid magnet or with an external one?
Just closing the lid. I don't have any magnets handy for testing.
It could be the magnet in the lid is too weak - but I had no idea how I could test the lid switch, so couldn't check that.
You can use evtest, pyra_test_inputs should also support it.
I tested with evtest.
-- Mit freundlichen Grüßen,
Michael Mrozek
OpenPandora GmbH Geschäftsführer: Michael Mrozek
Schäffbräustr. 11 85049 Ingolstadt Deutschland Tel.: 0841 / 990 5548 http://www.openpandora.de/ HRB 4879, Amtsgericht Ingolstadt
eMail: mrozek@openpandora.org