no data from /dev/input/event1

82 views
Skip to first unread message

John Franey

unread,
Mar 28, 2017, 11:53:34 AM3/28/17
to BeagleBoard
Hi,

I am experimenting with gpio_keys driver, to see if I can get it to work.  I fail.  Any suggestions?

I can read the value of the gpio through /sys/class/gpio/cpio48/value, and the value in fact changes depending on the button pressed/released.  The trouble: NOTHING comes up through /dev/input/event1 when I hit the button, demonstrated by evtest:

root@beaglebone:~/keys/overlay# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: tps65217_pwr_but
/dev/input/event1: ocp:gpio_keys
Select the device event number [0-1]: 1
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "ocp:gpio_keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 28 (KEY_ENTER)
Properties:
Testing ... (interrupt to exit)


I hope I've provided enough information.

Thanks.



Attached is the overlay.  This was derived from Derek Molloy's dts (http://exploringbeaglebone.com/chapter6/), and from the universal cape dts.  I started with Malloy's, but it didn't work.  I thought it was because my circuit has a pull-down register and his configured the gpio controller's pull-up resister).  So, I changed the dts to use neither, and, incidentally, changed the node name from pushbotton_pins to P9_15_gpio_pin (matching the name used by universal dts).  Then, I read here that the gpio offset had changed from debian 3.8 to 4.x (which I'm using), and so also made that necessary edit too.


uname:
root@beaglebone:~/keys/overlay# uname -a
Linux beaglebone 4.4.36-ti-r72 #1 SMP Wed Dec 7 22:29:53 UTC 2016 armv7l GNU/Linux


Here is edge:
root@beaglebone:~/keys/overlay# cat /sys/class/gpio/gpio48/edge
both

Yes, I had the universal cape disabled at boot time for this experiment.   My /boot/uEnv.txt:
#cmdline=coherent_pool=1M quiet net.ifnames=0 cape_universal=enable
cmdline=coherent_pool=1M quiet net.ifnames=0




Here is slots:
root@beaglebone:~/keys/overlay# cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1 
 1: PF----  -1 
 2: PF----  -1 
 3: PF----  -1 
 5: P-O-L-   0 Override Board Name,00A0,Override Manuf,BB-BONE-KEYS

Here is dmesg:
[ 1802.211933] bone_capemgr bone_capemgr: part_number 'BB-BONE-KEYS', version 'N/A'
[ 1802.212015] bone_capemgr bone_capemgr: slot #5: override
[ 1802.212061] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 1802.212109] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-BONE-KEYS'
[ 1802.238081] input: ocp:gpio_keys as /devices/platform/ocp/ocp:gpio_keys/input/input2
[ 1802.252947] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-BONE-KEYS-00A0.dtbo' loaded; overlay id #0

BB-BONE-KEYS-00A0.dts

John Franey

unread,
Mar 28, 2017, 4:26:04 PM3/28/17
to BeagleBoard
I tried a clean reboot.  Now event writes events from /dev/input/event1 to stdout.  Too many actually.

In any case, my original issue seems resolved by a reboot.
Reply all
Reply to author
Forward
0 new messages