Quantcast
Viewing all articles
Browse latest Browse all 4825

Interfacing (DSI, CSI, I2C, etc.) • gpio-mouse - how to increase the speed

I want to make use of the gpio-mouse driver - https://github.com/raspberrypi/linux/bl ... io_mouse.c - which allows to mimic a mouse function via buttons connected to GPIO.

I've implemented it using Raspberry GPIO as well as via an GPIO expander (MCP23017) but mouse movement is very slow for both of them (don't 'see' any difference to be honest).

Question: has anybody used this driver and knows how to increase mouse speed? The driver works polled, but don't think it's a good idea to change that scan-interval as it will cause a huge CPU load.

Code:

mouse: mouse@0 {compatible = "gpio-mouse";scan-interval-ms = <50>;up-gpios = <&mcp23017_20 11 GPIO_ACTIVE_LOW>;down-gpios = <&mcp23017_20 12 GPIO_ACTIVE_LOW>;left-gpios = <&mcp23017_20 13 GPIO_ACTIVE_LOW>;right-gpios = <&mcp23017_20 14 GPIO_ACTIVE_LOW>;button-left-gpios = <&mcp23017_20 15 GPIO_ACTIVE_LOW>;};
here are some 'measurement data' from evtest:

Code:

pi@Pi5-SN530:~ $ gpioinfo gpiochip14gpiochip14 - 16 lines:line   0:    "SELLVDS"    "sellvds"  output  active-high [used]line   1:       "AUX0"       "aux0"  output  active-high [used]line   2:       "AUX1"       "aux1"  output  active-high [used]line   3:       "AUX2"       "aux2"  output  active-high [used]line   4:       "AUX3"       "aux3"  output  active-high [used]line   5:    "UNUSED5"    "unused5"  output  active-high [used]line   6:    "UNUSED6"       unused   input  active-high line   7:    "UNUSED7"       unused   input  active-high line   8:    "UNUSED8"       unused   input  active-high line   9:    "UNUSED9"       unused   input  active-high line  10:   "UNUSED10"       unused   input  active-high line  11:         "UP"         "up"   input   active-low [used]line  12:       "DOWN"       "down"   input   active-low [used]line  13:       "LEFT"       "left"   input   active-low [used]line  14:      "RIGHT"      "right"   input   active-low [used]line  15:   "BTN_LEFT" "button-left" input active-low [used]pi@Pi5-SN530:~ $ evtestNo device specified, trying to scan all of /dev/input/event*Not running as root, no devices may be available.Available devices:/dev/input/event0:pwr_button/dev/input/event1:vc4-hdmi-0/dev/input/event2:vc4-hdmi-0 HDMI Jack/dev/input/event3:vc4-hdmi-1/dev/input/event4:vc4-hdmi-1 HDMI Jack/dev/input/event5:mouse@0Select the device event number [0-5]: 5Input driver version is 1.0.1Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0Input device name: "mouse@0"Supported events:  Event type 0 (EV_SYN)  Event type 1 (EV_KEY)    Event code 272 (BTN_LEFT)  Event type 2 (EV_REL)    Event code 0 (REL_X)    Event code 1 (REL_Y)Properties:Testing ... (interrupt to exit)Event: time 1735060132.365495, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060132.365495, -------------- SYN_REPORT ------------Event: time 1735060132.993461, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060132.993461, -------------- SYN_REPORT ------------Event: time 1735060153.161416, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060153.161416, -------------- SYN_REPORT ------------Event: time 1735060154.941179, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060154.941179, -------------- SYN_REPORT ------------Event: time 1735060158.365320, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060158.365320, -------------- SYN_REPORT ------------Event: time 1735060158.569742, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060158.569742, -------------- SYN_REPORT ------------Event: time 1735060158.705882, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060158.705882, -------------- SYN_REPORT ------------Event: time 1735060158.913468, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060158.913468, -------------- SYN_REPORT ------------Event: time 1735060159.055377, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060159.055377, -------------- SYN_REPORT ------------Event: time 1735060159.198825, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060159.198825, -------------- SYN_REPORT ------------Event: time 1735060172.069375, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060172.069375, -------------- SYN_REPORT ------------Event: time 1735060172.417615, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060172.417615, -------------- SYN_REPORT ------------Event: time 1735060172.486454, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1Event: time 1735060172.486454, -------------- SYN_REPORT ------------Event: time 1735060173.233782, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0Event: time 1735060173.233782, -------------- SYN_REPORT ------------Event: time 1735060174.325797, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.325797, -------------- SYN_REPORT ------------Event: time 1735060174.393669, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.393669, -------------- SYN_REPORT ------------Event: time 1735060174.465975, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.465975, -------------- SYN_REPORT ------------Event: time 1735060174.537336, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.537336, -------------- SYN_REPORT ------------Event: time 1735060174.609552, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.609552, -------------- SYN_REPORT ------------Event: time 1735060174.682697, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.682697, -------------- SYN_REPORT ------------Event: time 1735060174.757585, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.757585, -------------- SYN_REPORT ------------Event: time 1735060174.825528, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.825528, -------------- SYN_REPORT ------------Event: time 1735060174.893424, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.893424, -------------- SYN_REPORT ------------Event: time 1735060174.962229, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060174.962229, -------------- SYN_REPORT ------------Event: time 1735060175.037155, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060175.037155, -------------- SYN_REPORT ------------Event: time 1735060175.105889, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060175.105889, -------------- SYN_REPORT ------------Event: time 1735060175.177233, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060175.177233, -------------- SYN_REPORT ------------Event: time 1735060175.249461, type 2 (EV_REL), code 0 (REL_X), value 1Event: time 1735060175.249461, -------------- SYN_REPORT ------------Event: time 1735060178.381834, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.381834, -------------- SYN_REPORT ------------Event: time 1735060178.453201, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.453201, -------------- SYN_REPORT ------------Event: time 1735060178.525430, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.525430, -------------- SYN_REPORT ------------Event: time 1735060178.597641, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.597641, -------------- SYN_REPORT ------------Event: time 1735060178.670691, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.670691, -------------- SYN_REPORT ------------Event: time 1735060178.742139, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.742139, -------------- SYN_REPORT ------------Event: time 1735060178.809983, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.809983, -------------- SYN_REPORT ------------Event: time 1735060178.877884, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.877884, -------------- SYN_REPORT ------------Event: time 1735060178.946689, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060178.946689, -------------- SYN_REPORT ------------Event: time 1735060179.018228, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.018228, -------------- SYN_REPORT ------------Event: time 1735060179.086166, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.086166, -------------- SYN_REPORT ------------Event: time 1735060179.154142, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.154142, -------------- SYN_REPORT ------------Event: time 1735060179.223380, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.223380, -------------- SYN_REPORT ------------Event: time 1735060179.298463, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.298463, -------------- SYN_REPORT ------------Event: time 1735060179.366360, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.366360, -------------- SYN_REPORT ------------Event: time 1735060179.434266, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060179.434266, -------------- SYN_REPORT ------------Event: time 1735060187.338881, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.338881, -------------- SYN_REPORT ------------Event: time 1735060187.410569, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.410569, -------------- SYN_REPORT ------------Event: time 1735060187.485510, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.485510, -------------- SYN_REPORT ------------Event: time 1735060187.554245, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.554245, -------------- SYN_REPORT ------------Event: time 1735060187.622344, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.622344, -------------- SYN_REPORT ------------Event: time 1735060187.693992, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.693992, -------------- SYN_REPORT ------------Event: time 1735060187.765581, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.765581, -------------- SYN_REPORT ------------Event: time 1735060187.837778, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.837778, -------------- SYN_REPORT ------------Event: time 1735060187.905663, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.905663, -------------- SYN_REPORT ------------Event: time 1735060187.977953, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060187.977953, -------------- SYN_REPORT ------------Event: time 1735060188.045860, type 2 (EV_REL), code 0 (REL_X), value -1Event: time 1735060188.045860, -------------- SYN_REPORT ------------Event: time 1735060189.205962, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.205962, -------------- SYN_REPORT ------------Event: time 1735060189.275644, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.275644, -------------- SYN_REPORT ------------Event: time 1735060189.345268, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.345268, -------------- SYN_REPORT ------------Event: time 1735060189.417520, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.417520, -------------- SYN_REPORT ------------Event: time 1735060189.486112, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.486112, -------------- SYN_REPORT ------------Event: time 1735060189.554016, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.554016, -------------- SYN_REPORT ------------Event: time 1735060189.621918, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.621918, -------------- SYN_REPORT ------------Event: time 1735060189.690014, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.690014, -------------- SYN_REPORT ------------Event: time 1735060189.758160, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.758160, -------------- SYN_REPORT ------------Event: time 1735060189.825494, type 2 (EV_REL), code 1 (REL_Y), value 1Event: time 1735060189.825494, -------------- SYN_REPORT ------------

Statistics: Posted by aBUGSworstnightmare — Tue Dec 24, 2024 5:22 pm



Viewing all articles
Browse latest Browse all 4825

Trending Articles