Tactility/Drivers/gpio-trackball-module
Ken Van Hoeylandt 85b61e1e43
Improve module configuration (#661)
DTS modules (device modules) often have a single source file with an empty `struct Module`.
The module's yaml file now allows a `dts-only` boolean to be set, so the source file becomes optional.
`devicetree.yaml` is renamed everywhere to `module.yaml`
2026-09-25 21:56:37 +02:00
..
2026-07-30 13:38:19 +02:00
2026-07-30 13:38:19 +02:00
2026-09-13 00:52:16 +02:00
2026-07-30 13:38:19 +02:00
2026-07-30 13:38:19 +02:00
2026-07-30 13:38:19 +02:00

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>;
};

License

Apache License Version 2.0