"event" files in /dev/input/: how to check to which peripheral they are associated

19 views
Skip to first unread message

Pavel Yermolenko

unread,
Sep 21, 2020, 11:49:26 AM9/21/20
to BeagleBoard
Hello,
There are single event0 file in /dev/input/.
How to check to which peripheral it's associated ?
Thanks.

Robert Nelson

unread,
Sep 21, 2020, 11:59:56 AM9/21/20
to Beagle Board
You can use /dev/input/by-path/ to figure that out..

debian@bbg-pwr06-ser14:~$ ls -lha
/dev/input/by-path/platform-44e0b000.i2c-platform-tps65217-pwrbutton-event
lrwxrwxrwx 1 root root 9 Sep 8 16:22
/dev/input/by-path/platform-44e0b000.i2c-platform-tps65217-pwrbutton-event
-> ../event0

The tps65217's power button is setup as event0.. (labeled as POWER on
the silkscreen of the pcb)

Regards,

--
Robert Nelson
https://rcn-ee.com/

Pavel Yermolenko

unread,
Sep 21, 2020, 1:08:37 PM9/21/20
to BeagleBoard
Thanks Robert,
Can one create another event and associate it with gpio ?
In the source code for "Exploring BeagleBone" there is example testgpio_keys.
In this code author explore event1 file.
Sincerely.

On Monday, September 21, 2020 at 5:59:56 PM UTC+2, RobertCNelson wrote:
Reply all
Reply to author
Forward
0 new messages