Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / input / gpio-mouse.txt
1 Device-Tree bindings for GPIO attached mice
2
3 This simply uses standard GPIO handles to define a simple mouse connected
4 to 5-7 GPIO lines.
5
6 Required properties:
7         - compatible: must be "gpio-mouse"
8         - scan-interval-ms: The scanning interval in milliseconds
9         - up-gpios: GPIO line phandle to the line indicating "up"
10         - down-gpios: GPIO line phandle to the line indicating "down"
11         - left-gpios: GPIO line phandle to the line indicating "left"
12         - right-gpios: GPIO line phandle to the line indicating "right"
13
14 Optional properties:
15         - button-left-gpios: GPIO line handle to the left mouse button
16         - button-middle-gpios: GPIO line handle to the middle mouse button
17         - button-right-gpios: GPIO line handle to the right mouse button
18 Example:
19
20 #include <dt-bindings/gpio/gpio.h>
21
22 gpio-mouse {
23         compatible = "gpio-mouse";
24         scan-interval-ms = <50>;
25         up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
26         down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
27         left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
28         right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
29         button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
30         button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
31         button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
32 };