mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-18 07:55:06 +00:00
- Implement generic trackball settings - Refactor T-Deck trackball driver into generic driver at `Drivers/gpio-trackball-module` - Automatically bind/unbind trackball devices with LVGL - Automatically load settings for trackball devices on boot
830 B
830 B
GPIO Trackball
Kernel driver for a 5-way GPIO trackball (4 direction pins + a click button), exposing a
TRACKBALL_TYPE device (tactility/drivers/trackball.h).
Devicetree binding: tactility,gpio-trackball (see bindings/tactility,gpio-trackball.yaml).
Each direction pin is wired to a falling-edge interrupt that accumulates a signed delta;
the click pin is active-low and read on any edge. read_delta() drains and resets the
accumulated delta on each call.
Example
trackball {
compatible = "tactility,gpio-trackball";
pin-right = <&gpio0 1 GPIO_FLAG_NONE>;
pin-up = <&gpio0 2 GPIO_FLAG_NONE>;
pin-left = <&gpio0 3 GPIO_FLAG_NONE>;
pin-down = <&gpio0 4 GPIO_FLAG_NONE>;
pin-click = <&gpio0 5 GPIO_FLAG_NONE>;
};