gpio-mouse.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. Device-Tree bindings for GPIO attached mice
  2. This simply uses standard GPIO handles to define a simple mouse connected
  3. to 5-7 GPIO lines.
  4. Required properties:
  5. - compatible: must be "gpio-mouse"
  6. - scan-interval-ms: The scanning interval in milliseconds
  7. - up-gpios: GPIO line phandle to the line indicating "up"
  8. - down-gpios: GPIO line phandle to the line indicating "down"
  9. - left-gpios: GPIO line phandle to the line indicating "left"
  10. - right-gpios: GPIO line phandle to the line indicating "right"
  11. Optional properties:
  12. - button-left-gpios: GPIO line handle to the left mouse button
  13. - button-middle-gpios: GPIO line handle to the middle mouse button
  14. - button-right-gpios: GPIO line handle to the right mouse button
  15. Example:
  16. #include <dt-bindings/gpio/gpio.h>
  17. gpio-mouse {
  18. compatible = "gpio-mouse";
  19. scan-interval-ms = <50>;
  20. up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  21. down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  22. left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  23. right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
  24. button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
  25. button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
  26. button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  27. };