I am maintaining this project [1] to drive (Arcade) Joysticks via GPIO.
The axis events are fired when I attach a joystick with momentary switches or use Du Pont wires (lines 39 to 46).
However, there is no event "value 0" when the joystick is released / is in neutral position (also the axis start with a non 0 value (see line 30, 34)).
According to the spec [2] the value 0 should be sent out.
In contrast the A/South button does send a value 0 event when released (line 47 to 50).
The dts I am using is this [3] (fragment@3).
Hardware is a Raspberry Pi 5 Model B Rev 1.0.
Kernel is Linux rpi5-clean 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt2 (2024-10-01) aarch64 GNU/Linux.
Questions:
- Do EV_ABS events need a interrupt specification to trigger on both edges in contrast to the EV_KEY definitions?
- If so, could you nudge me to the interrupt/pinctrl settings? (I tried to wrap my head around but did not succeed)
- Do I have to set the min/max values instead of the value? (if so, how to achieve this in DTS?)
- Less likely, but: Is this a known issue/regression with the kernel?
- What else could be the culprit?
Thanks.
[1] https://github.com/Gemba/arcade-dt/tree/dev
[2] https://github.com/torvalds/linux/blob/ ... s.yaml#L62
[3] https://github.com/Gemba/arcade-dt/blob ... ts#L52-L79
The axis events are fired when I attach a joystick with momentary switches or use Du Pont wires (lines 39 to 46).
However, there is no event "value 0" when the joystick is released / is in neutral position (also the axis start with a non 0 value (see line 30, 34)).
According to the spec [2] the value 0 should be sent out.
In contrast the A/South button does send a value 0 event when released (line 47 to 50).
Code:
1$ evtest 2No device specified, trying to scan all of /dev/input/event* 3Not running as root, no devices may be available. 4Available devices: 5/dev/input/event0:HID 046a:0011 6/dev/input/event1:vc4-hdmi-0 7/dev/input/event2:GPIO Arcade Joystick 1 8/dev/input/event3:pwr_button 9/dev/input/event4:vc4-hdmi-0 HDMI Jack 10/dev/input/event5:vc4-hdmi-1 11/dev/input/event6:vc4-hdmi-1 HDMI Jack 12Select the device event number [0-6]: 2 13Input driver version is 1.0.1 14Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 15Input device name: "GPIO Arcade Joystick 1" 16Supported events: 17 Event type 0 (EV_SYN) 18 Event type 1 (EV_KEY) 19 Event code 304 (BTN_SOUTH) 20 Event code 305 (BTN_EAST) 21 Event code 307 (BTN_NORTH) 22 Event code 308 (BTN_WEST) 23 Event code 310 (BTN_TL) 24 Event code 311 (BTN_TR) 25 Event code 314 (BTN_SELECT) 26 Event code 315 (BTN_START) 27 Event code 316 (BTN_MODE) 28 Event type 3 (EV_ABS) 29 Event code 0 (ABS_X) 30 Value 1 31 Min 0 32 Max 0 33 Event code 1 (ABS_Y) 34 Value 1 35 Min 0 36 Max 0 37Properties: 38Testing ... (interrupt to exit) 39Event: time 1728971684.836092, type 3 (EV_ABS), code 1 (ABS_Y), value -1 40Event: time 1728971684.836092, -------------- SYN_REPORT ------------ 41Event: time 1728971693.331884, type 3 (EV_ABS), code 0 (ABS_X), value -1 42Event: time 1728971693.331884, -------------- SYN_REPORT ------------ 43Event: time 1728971694.331196, type 3 (EV_ABS), code 0 (ABS_X), value 1 44Event: time 1728971694.331196, -------------- SYN_REPORT ------------ 45Event: time 1728971696.493407, type 3 (EV_ABS), code 1 (ABS_Y), value 1 46Event: time 1728971696.493407, -------------- SYN_REPORT ------------ 47Event: time 1728971698.973714, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1 48Event: time 1728971698.973714, -------------- SYN_REPORT ------------ 49Event: time 1728971699.052054, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0 50Event: time 1728971699.052054, -------------- SYN_REPORT ------------
Hardware is a Raspberry Pi 5 Model B Rev 1.0.
Kernel is Linux rpi5-clean 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt2 (2024-10-01) aarch64 GNU/Linux.
Questions:
- Do EV_ABS events need a interrupt specification to trigger on both edges in contrast to the EV_KEY definitions?
- If so, could you nudge me to the interrupt/pinctrl settings? (I tried to wrap my head around but did not succeed)
- Do I have to set the min/max values instead of the value? (if so, how to achieve this in DTS?)
- Less likely, but: Is this a known issue/regression with the kernel?
- What else could be the culprit?
Thanks.
[1] https://github.com/Gemba/arcade-dt/tree/dev
[2] https://github.com/torvalds/linux/blob/ ... s.yaml#L62
[3] https://github.com/Gemba/arcade-dt/blob ... ts#L52-L79
Statistics: Posted by MartyMax — Tue Oct 15, 2024 6:20 am