blob: 359d7008acbd8acf168bf2373feffa99c39107f0 [file] [log] [blame]
Rohit Vaswanib1cc4932012-07-23 21:30:11 -07001MSM GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "qcom,msm-gpio" for MSM controllers
6- #gpio-cells : Should be two.
7 - first cell is the pin number
8 - second cell is used to specify optional parameters (unused)
9- gpio-controller : Marks the device node as a GPIO controller.
10- #interrupt-cells : Should be 2.
11- interrupt-controller: Mark the device node as an interrupt controller
12
13Example:
14
15 msmgpio: gpio@fd510000 {
16 compatible = "qcom,msm-gpio";
17 gpio-controller;
18 #gpio-cells = <2>;
19 interrupt-controller;
20 #interrupt-cells = <2>;
21 reg = <0xfd510000 0x4000>;
22 };
23
24To specify gpios for a device:
25
26 device1@f991f000 {
27 compatible = "qcom,msm-device-v1";
28 reg = <0xf991f000 0x1000>;
29 gpios = <&msmgpio 45 0>;
30 cs-gpios = <&msmgpio 46 0>;
31 };
32
3345, 46 - gpio numbers.
34The driver for device1 can call of_get_gpio() to extract the
35gpio45. In order to extract gpio46, the driver needs to call
36of_get_named_gpio with "cs-gpios" as the name parameter.
37Please refer to the file: include/linux/of_gpio.h for the
38complete list of APIs the driver can use to extract gpio
39information from the device tree.