aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/gpio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-18 08:22:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-18 08:22:10 -0400
commit510965dd4a0a59504ba38455f77339ea8b4c6a70 (patch)
tree36492629ac68de94457482562660154f28e9e039 /Documentation/devicetree/bindings/gpio
parent40d7839879b4584f91522d841afb22ed401cf40f (diff)
parent03daa6f82f2b634019fe8261698f6af3c133497f (diff)
Merge tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.1 development cycle: - A new GPIO hogging mechanism has been added. This can be used on boards that want to drive some GPIO line high, low, or set it as input on boot and then never touch it again. For some embedded systems this is bliss and simplifies things to a great extent. - Some API cleanup and closure: gpiod_get_array() and gpiod_put_array() has been added to get and put GPIOs in bulk as was possible with the non-descriptor API. - Encapsulate cross-calls to the pin control subsystem in <linux/gpio/driver.h>. Now this should be the only header any GPIO driver needs to include or something is wrong. Cleanups restricting drivers to this include are welcomed if tested. - Sort the GPIO Kconfig and split it into submenus, as it was becoming and unstructured, illogical and unnavigatable mess. I hope this is easier to follow. Menus that require a certain subsystem like I2C can now be hidden nicely for example, still working on others. - New drivers: - New driver for the Altera Soft GPIO. - The F7188x driver now handles the F71869 and F71869A variants. - The MIPS Loongson driver has been moved to drivers/gpio for consolidation and cleanup. - Cleanups: - The MAX732x is converted to use the GPIOLIB_IRQCHIP infrastructure. - The PCF857x is converted to use the GPIOLIB_IRQCHIP infrastructure. - Radical cleanup of the OMAP driver. - Misc: - Enable the DWAPB GPIO for all architectures. This is a "hard IP" block from Synopsys which has started to turn up in so diverse architectures as X86 Quark, ARC and a slew of ARM systems. So even though it's not an expander, it's generic enough to be available for all. - We add a mock GPIO on Crystalcove PMIC after a long discussion with Daniel Vetter et al, tracing back to the shootout at the kernel summit where DRM drivers and sub-componentization was discussed. In this case a mock GPIO is assumed to be the best compromise gaining some reuse of infrastructure without making DRM drivers overly complex at the same time. Let's see" * tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (62 commits) Revert "gpio: sch: use uapi/linux/pci_ids.h directly" gpio: dwapb: remove dependencies gpio: dwapb: enable for ARC gpio: removing kfree remove functionality gpio: mvebu: Fix mask/unmask managment per irq chip type gpio: split GPIO drivers in submenus gpio: move MFD GPIO drivers under their own comment gpio: move BCM Kona Kconfig option gpio: arrange SPI Kconfig symbols alphabetically gpio: arrange PCI GPIO controllers alphabetically gpio: arrange I2C Kconfig symbols alphabetically gpio: arrange Kconfig symbols alphabetically gpio: ich: Implement get_direction function gpio: use (!foo) instead of (foo == NULL) gpio: arizona: drop owner assignment from platform_drivers gpio: max7300: remove 'ret' variable gpio: use devm_kzalloc gpio: sch: use uapi/linux/pci_ids.h directly gpio: x-gene: fix devm_ioremap_resource() check gpio: loongson: Add Loongson-3A/3B GPIO driver support ...
Diffstat (limited to 'Documentation/devicetree/bindings/gpio')
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-altera.txt43
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio.txt30
-rw-r--r--Documentation/devicetree/bindings/gpio/mrvl-gpio.txt2
3 files changed, 74 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-altera.txt b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
new file mode 100644
index 000000000000..12f50149e1ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
@@ -0,0 +1,43 @@
1Altera GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "altr,pio-1.0"
6- reg: Physical base address and length of the controller's registers.
7- #gpio-cells : Should be 2
8 - The first cell is the gpio offset number.
9 - The second cell is reserved and is currently unused.
10- gpio-controller : Marks the device node as a GPIO controller.
11- interrupt-controller: Mark the device node as an interrupt controller
12- #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware.
13 - The first cell is the GPIO offset number within the GPIO controller.
14- interrupts: Specify the interrupt.
15- altr,interrupt-trigger: Specifies the interrupt trigger type the GPIO
16 hardware is synthesized. This field is required if the Altera GPIO controller
17 used has IRQ enabled as the interrupt type is not software controlled,
18 but hardware synthesized. Required if GPIO is used as an interrupt
19 controller. The value is defined in <dt-bindings/interrupt-controller/irq.h>
20 Only the following flags are supported:
21 IRQ_TYPE_EDGE_RISING
22 IRQ_TYPE_EDGE_FALLING
23 IRQ_TYPE_EDGE_BOTH
24 IRQ_TYPE_LEVEL_HIGH
25
26Optional properties:
27- altr,ngpio: Width of the GPIO bank. This defines how many pins the
28 GPIO device has. Ranges between 1-32. Optional and defaults to 32 if not
29 specified.
30
31Example:
32
33gpio_altr: gpio@0xff200000 {
34 compatible = "altr,pio-1.0";
35 reg = <0xff200000 0x10>;
36 interrupts = <0 45 4>;
37 altr,ngpio = <32>;
38 altr,interrupt-trigger = <IRQ_TYPE_EDGE_RISING>;
39 #gpio-cells = <2>;
40 gpio-controller;
41 #interrupt-cells = <1>;
42 interrupt-controller;
43};
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index f7a158d85862..5788d5cf1252 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -116,6 +116,29 @@ Every GPIO controller node must contain both an empty "gpio-controller"
116property, and a #gpio-cells integer property, which indicates the number of 116property, and a #gpio-cells integer property, which indicates the number of
117cells in a gpio-specifier. 117cells in a gpio-specifier.
118 118
119The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
120providing automatic GPIO request and configuration as part of the
121gpio-controller's driver probe function.
122
123Each GPIO hog definition is represented as a child node of the GPIO controller.
124Required properties:
125- gpio-hog: A property specifying that this child node represent a GPIO hog.
126- gpios: Store the GPIO information (id, flags, ...). Shall contain the
127 number of cells specified in its parent node (GPIO controller
128 node).
129Only one of the following properties scanned in the order shown below.
130This means that when multiple properties are present they will be searched
131in the order presented below and the first match is taken as the intended
132configuration.
133- input: A property specifying to set the GPIO direction as input.
134- output-low A property specifying to set the GPIO direction as output with
135 the value low.
136- output-high A property specifying to set the GPIO direction as output with
137 the value high.
138
139Optional properties:
140- line-name: The GPIO label name. If not present the node name is used.
141
119Example of two SOC GPIO banks defined as gpio-controller nodes: 142Example of two SOC GPIO banks defined as gpio-controller nodes:
120 143
121 qe_pio_a: gpio-controller@1400 { 144 qe_pio_a: gpio-controller@1400 {
@@ -123,6 +146,13 @@ Example of two SOC GPIO banks defined as gpio-controller nodes:
123 reg = <0x1400 0x18>; 146 reg = <0x1400 0x18>;
124 gpio-controller; 147 gpio-controller;
125 #gpio-cells = <2>; 148 #gpio-cells = <2>;
149
150 line_b {
151 gpio-hog;
152 gpios = <6 0>;
153 output-low;
154 line-name = "foo-bar-gpio";
155 };
126 }; 156 };
127 157
128 qe_pio_e: gpio-controller@1460 { 158 qe_pio_e: gpio-controller@1460 {
diff --git a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
index 67a2e4e414a5..98d198396956 100644
--- a/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/mrvl-gpio.txt
@@ -12,7 +12,7 @@ Required properties:
12 gpio_mux. 12 gpio_mux.
13- interrupt-names : Should be the names of irq resources. Each interrupt 13- interrupt-names : Should be the names of irq resources. Each interrupt
14 uses its own interrupt name, so there should be as many interrupt names 14 uses its own interrupt name, so there should be as many interrupt names
15 as referenced interrups. 15 as referenced interrupts.
16- interrupt-controller : Identifies the node as an interrupt controller. 16- interrupt-controller : Identifies the node as an interrupt controller.
17- #interrupt-cells: Specifies the number of cells needed to encode an 17- #interrupt-cells: Specifies the number of cells needed to encode an
18 interrupt source. 18 interrupt source.