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

Hello,

There are single event0 file in /dev/input/.
How to check to which peripheral it’s associated ?
Thanks.

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,

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.