summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-05 14:49:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-05 14:49:48 -0400
commit70b8e9eb3b50d8bded63f808b09c4844ef63c3b8 (patch)
tree42b5b22becc9e9542923be3bc78525e0d9f5c67c /Documentation
parentd16605c9128a498f9b8575b5c43be95c45dbcfab (diff)
parent02b6bddb0b0a4e27fad6623d82579f2a1e35d3d3 (diff)
Merge tag 'gpio-v4.14-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 the GPIO changes for the v4.14 cycle. Not so much changes this time, phew. David Daney and Bartosz Golaszewski did all the really interesting work in infrastructure improvement across GPIO and IRQ core, hats off for them and to tglx and Marc Z for general help with these patch sets. Core changes: - Allow the GPIO irqchip to allocate IRQs dynamically. This is an important change on systems where only a restricted number of IRQs, lesser than the number of GPIO lines, can be utilized. Now we can allocate these on a first-come-first-served basis instead of hogging up valuable IRQ lines. - Serious fix-up of the kerneldoc documentation and inclusion into the kerneldoc builds. - Pulled in the IRQ simulator from the IRQ core tree and use this in the GPIO mockup driver for exhaustive testing of interrupt abilities. New drivers: - New driver for ThunderX and OCTEON-TX. This is especially interesting as it picks up improvements from the IRQ core that allow us to handle fasteoi ACKs upwards in a hierarchy when there are IRQ flag latches on several levels in a hierarchy. Very interesting work here. - New subdriver for Renesas R-Car r8a7745 (RZ/G1E). Misc: - Several fixes and improvements for Xilinx Zynq GPIO. - Support an enablement GPIO for the 74x164 GPIO. - Switch a bunch of chips to use devres to allocate irq descriptors. - A bunch of constification fixes" * tag 'gpio-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (63 commits) gpio: mockup: remove unused variable gc gpio: pl061: constify amba_id Revert "gpiolib: request the gpio before querying its direction" gpio: twl6040: remove unneeded forward declaration gpio: zevio: make gpio_chip const gpio: add gpio_add_lookup_tables() to add several tables at once gpio: rcar: Add r8a7745 (RZ/G1E) support gpio: brcmstb: check return value of gpiochip_irqchip_add() MAINTAINERS: Add entry for THUNDERX GPIO Driver. gpio: Add gpio driver support for ThunderX and OCTEON-TX gpio: mockup: use irq_sim gpio: mxs: use devres for irq generic chip gpio: mxc: use devres for irq generic chip gpio: pch: use devres for irq generic chip gpio: ml-ioh: use devres for irq generic chip gpio: sta2x11: use devres for irq generic chip gpio: sta2x11: disallow unbinding the driver gpio: mxs: disallow unbinding the driver gpio: mxc: disallow unbinding the driver gpio: aspeed: Remove reference to clock name in debounce warning message ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-74x164.txt3
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-aspeed.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-davinci.txt91
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-vf610.txt4
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt16
-rw-r--r--Documentation/driver-api/gpio.rst45
-rw-r--r--Documentation/driver-api/index.rst1
7 files changed, 154 insertions, 8 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74x164.txt b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt
index ce1b2231bf5d..2a97553d8d76 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-74x164.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt
@@ -12,6 +12,9 @@ Required properties:
12 1 = active low 12 1 = active low
13- registers-number: Number of daisy-chained shift registers 13- registers-number: Number of daisy-chained shift registers
14 14
15Optional properties:
16- enable-gpios: GPIO connected to the OE (Output Enable) pin.
17
15Example: 18Example:
16 19
17gpio5: gpio5@0 { 20gpio5: gpio5@0 {
diff --git a/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt b/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt
index c756afa88cc6..fc6378c778c5 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt
@@ -18,7 +18,7 @@ Required properties:
18Optional properties: 18Optional properties:
19 19
20- interrupt-parent : The parent interrupt controller, optional if inherited 20- interrupt-parent : The parent interrupt controller, optional if inherited
21- clocks : A phandle to the HPLL clock node for debounce timings 21- clocks : A phandle to the clock to use for debounce timings
22 22
23The gpio and interrupt properties are further described in their respective 23The gpio and interrupt properties are further described in their respective
24bindings documentation: 24bindings documentation:
diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
index 5079ba7d6568..8beb0539b6d8 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
@@ -1,7 +1,10 @@
1Davinci/Keystone GPIO controller bindings 1Davinci/Keystone GPIO controller bindings
2 2
3Required Properties: 3Required Properties:
4- compatible: should be "ti,dm6441-gpio", "ti,keystone-gpio" 4- compatible: should be "ti,dm6441-gpio": for Davinci da850 SoCs
5 "ti,keystone-gpio": for Keystone 2 66AK2H/K, 66AK2L,
6 66AK2E SoCs
7 "ti,k2g-gpio", "ti,keystone-gpio": for 66AK2G
5 8
6- reg: Physical base address of the controller and the size of memory mapped 9- reg: Physical base address of the controller and the size of memory mapped
7 registers. 10 registers.
@@ -20,7 +23,21 @@ Required Properties:
20- ti,ngpio: The number of GPIO pins supported. 23- ti,ngpio: The number of GPIO pins supported.
21 24
22- ti,davinci-gpio-unbanked: The number of GPIOs that have an individual interrupt 25- ti,davinci-gpio-unbanked: The number of GPIOs that have an individual interrupt
23 line to processor. 26 line to processor.
27
28- clocks: Should contain the device's input clock, and should be defined as per
29 the appropriate clock bindings consumer usage in,
30
31 Documentation/devicetree/bindings/clock/keystone-gate.txt
32 for 66AK2HK/66AK2L/66AK2E SoCs or,
33
34 Documentation/devicetree/bindings/clock/ti,sci-clk.txt
35 for 66AK2G SoCs
36
37- clock-names: Name should be "gpio";
38
39Currently clock-names and clocks are needed for all keystone 2 platforms
40Davinci platforms do not have DT clocks as of now.
24 41
25The GPIO controller also acts as an interrupt controller. It uses the default 42The GPIO controller also acts as an interrupt controller. It uses the default
26two cells specifier as described in Documentation/devicetree/bindings/ 43two cells specifier as described in Documentation/devicetree/bindings/
@@ -60,3 +77,73 @@ leds {
60 ... 77 ...
61 }; 78 };
62}; 79};
80
81Example for 66AK2G:
82
83gpio0: gpio@2603000 {
84 compatible = "ti,k2g-gpio", "ti,keystone-gpio";
85 reg = <0x02603000 0x100>;
86 gpio-controller;
87 #gpio-cells = <2>;
88 interrupts = <GIC_SPI 432 IRQ_TYPE_EDGE_RISING>,
89 <GIC_SPI 433 IRQ_TYPE_EDGE_RISING>,
90 <GIC_SPI 434 IRQ_TYPE_EDGE_RISING>,
91 <GIC_SPI 435 IRQ_TYPE_EDGE_RISING>,
92 <GIC_SPI 436 IRQ_TYPE_EDGE_RISING>,
93 <GIC_SPI 437 IRQ_TYPE_EDGE_RISING>,
94 <GIC_SPI 438 IRQ_TYPE_EDGE_RISING>,
95 <GIC_SPI 439 IRQ_TYPE_EDGE_RISING>,
96 <GIC_SPI 440 IRQ_TYPE_EDGE_RISING>;
97 interrupt-controller;
98 #interrupt-cells = <2>;
99 ti,ngpio = <144>;
100 ti,davinci-gpio-unbanked = <0>;
101 clocks = <&k2g_clks 0x001b 0x0>;
102 clock-names = "gpio";
103};
104
105Example for 66AK2HK/66AK2L/66AK2E:
106
107gpio0: gpio@260bf00 {
108 compatible = "ti,keystone-gpio";
109 reg = <0x0260bf00 0x100>;
110 gpio-controller;
111 #gpio-cells = <2>;
112 /* HW Interrupts mapped to GPIO pins */
113 interrupts = <GIC_SPI 120 IRQ_TYPE_EDGE_RISING>,
114 <GIC_SPI 121 IRQ_TYPE_EDGE_RISING>,
115 <GIC_SPI 122 IRQ_TYPE_EDGE_RISING>,
116 <GIC_SPI 123 IRQ_TYPE_EDGE_RISING>,
117 <GIC_SPI 124 IRQ_TYPE_EDGE_RISING>,
118 <GIC_SPI 125 IRQ_TYPE_EDGE_RISING>,
119 <GIC_SPI 126 IRQ_TYPE_EDGE_RISING>,
120 <GIC_SPI 127 IRQ_TYPE_EDGE_RISING>,
121 <GIC_SPI 128 IRQ_TYPE_EDGE_RISING>,
122 <GIC_SPI 129 IRQ_TYPE_EDGE_RISING>,
123 <GIC_SPI 130 IRQ_TYPE_EDGE_RISING>,
124 <GIC_SPI 131 IRQ_TYPE_EDGE_RISING>,
125 <GIC_SPI 132 IRQ_TYPE_EDGE_RISING>,
126 <GIC_SPI 133 IRQ_TYPE_EDGE_RISING>,
127 <GIC_SPI 134 IRQ_TYPE_EDGE_RISING>,
128 <GIC_SPI 135 IRQ_TYPE_EDGE_RISING>,
129 <GIC_SPI 136 IRQ_TYPE_EDGE_RISING>,
130 <GIC_SPI 137 IRQ_TYPE_EDGE_RISING>,
131 <GIC_SPI 138 IRQ_TYPE_EDGE_RISING>,
132 <GIC_SPI 139 IRQ_TYPE_EDGE_RISING>,
133 <GIC_SPI 140 IRQ_TYPE_EDGE_RISING>,
134 <GIC_SPI 141 IRQ_TYPE_EDGE_RISING>,
135 <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>,
136 <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>,
137 <GIC_SPI 144 IRQ_TYPE_EDGE_RISING>,
138 <GIC_SPI 145 IRQ_TYPE_EDGE_RISING>,
139 <GIC_SPI 146 IRQ_TYPE_EDGE_RISING>,
140 <GIC_SPI 147 IRQ_TYPE_EDGE_RISING>,
141 <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>,
142 <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>,
143 <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>,
144 <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
145 clocks = <&clkgpio>;
146 clock-names = "gpio";
147 ti,ngpio = <32>;
148 ti,davinci-gpio-unbanked = <32>;
149};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
index 436cc99c6598..0ccbae44019c 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.txt
@@ -5,7 +5,9 @@ functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of
5each, and each PORT module has its own interrupt. 5each, and each PORT module has its own interrupt.
6 6
7Required properties for GPIO node: 7Required properties for GPIO node:
8- compatible : Should be "fsl,<soc>-gpio", currently "fsl,vf610-gpio" 8- compatible : Should be "fsl,<soc>-gpio", below is supported list:
9 "fsl,vf610-gpio"
10 "fsl,imx7ulp-gpio"
9- reg : The first reg tuple represents the PORT module, the second tuple 11- reg : The first reg tuple represents the PORT module, the second tuple
10 the GPIO module. 12 the GPIO module.
11- interrupts : Should be the port interrupt shared by all 32 pins. 13- interrupts : Should be the port interrupt shared by all 32 pins.
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index 6826a371fb69..51c86f69995e 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -2,8 +2,9 @@
2 2
3Required Properties: 3Required Properties:
4 4
5 - compatible: should contain one of the following. 5 - compatible: should contain one or more of the following:
6 - "renesas,gpio-r8a7743": for R8A7743 (RZ/G1M) compatible GPIO controller. 6 - "renesas,gpio-r8a7743": for R8A7743 (RZ/G1M) compatible GPIO controller.
7 - "renesas,gpio-r8a7745": for R8A7745 (RZ/G1E) compatible GPIO controller.
7 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. 8 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
8 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. 9 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
9 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. 10 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
@@ -13,7 +14,14 @@ Required Properties:
13 - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller. 14 - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
14 - "renesas,gpio-r8a7795": for R8A7795 (R-Car H3) compatible GPIO controller. 15 - "renesas,gpio-r8a7795": for R8A7795 (R-Car H3) compatible GPIO controller.
15 - "renesas,gpio-r8a7796": for R8A7796 (R-Car M3-W) compatible GPIO controller. 16 - "renesas,gpio-r8a7796": for R8A7796 (R-Car M3-W) compatible GPIO controller.
16 - "renesas,gpio-rcar": for generic R-Car GPIO controller. 17 - "renesas,rcar-gen1-gpio": for a generic R-Car Gen1 GPIO controller.
18 - "renesas,rcar-gen2-gpio": for a generic R-Car Gen2 or RZ/G1 GPIO controller.
19 - "renesas,rcar-gen3-gpio": for a generic R-Car Gen3 GPIO controller.
20 - "renesas,gpio-rcar": deprecated.
21
22 When compatible with the generic version nodes must list the
23 SoC-specific version corresponding to the platform first followed by
24 the generic version.
17 25
18 - reg: Base address and length of each memory resource used by the GPIO 26 - reg: Base address and length of each memory resource used by the GPIO
19 controller hardware module. 27 controller hardware module.
@@ -43,7 +51,7 @@ interrupt-controller/interrupts.txt.
43Example: R8A7779 (R-Car H1) GPIO controller nodes 51Example: R8A7779 (R-Car H1) GPIO controller nodes
44 52
45 gpio0: gpio@ffc40000 { 53 gpio0: gpio@ffc40000 {
46 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 54 compatible = "renesas,gpio-r8a7779", "renesas,rcar-gen1-gpio";
47 reg = <0xffc40000 0x2c>; 55 reg = <0xffc40000 0x2c>;
48 interrupt-parent = <&gic>; 56 interrupt-parent = <&gic>;
49 interrupts = <0 141 0x4>; 57 interrupts = <0 141 0x4>;
@@ -55,7 +63,7 @@ Example: R8A7779 (R-Car H1) GPIO controller nodes
55 }; 63 };
56 ... 64 ...
57 gpio6: gpio@ffc46000 { 65 gpio6: gpio@ffc46000 {
58 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; 66 compatible = "renesas,gpio-r8a7779", "renesas,rcar-gen1-gpio";
59 reg = <0xffc46000 0x2c>; 67 reg = <0xffc46000 0x2c>;
60 interrupt-parent = <&gic>; 68 interrupt-parent = <&gic>;
61 interrupts = <0 147 0x4>; 69 interrupts = <0 147 0x4>;
diff --git a/Documentation/driver-api/gpio.rst b/Documentation/driver-api/gpio.rst
new file mode 100644
index 000000000000..6dd4aa647f27
--- /dev/null
+++ b/Documentation/driver-api/gpio.rst
@@ -0,0 +1,45 @@
1===================================
2General Purpose Input/Output (GPIO)
3===================================
4
5Core
6====
7
8.. kernel-doc:: include/linux/gpio/driver.h
9 :internal:
10
11.. kernel-doc:: drivers/gpio/gpiolib.c
12 :export:
13
14Legacy API
15==========
16
17The functions listed in this section are deprecated. The GPIO descriptor based
18API described above should be used in new code.
19
20.. kernel-doc:: drivers/gpio/gpiolib-legacy.c
21 :export:
22
23ACPI support
24============
25
26.. kernel-doc:: drivers/gpio/gpiolib-acpi.c
27 :export:
28
29Device tree support
30===================
31
32.. kernel-doc:: drivers/gpio/gpiolib-of.c
33 :export:
34
35Device-managed API
36==================
37
38.. kernel-doc:: drivers/gpio/devres.c
39 :export:
40
41sysfs helpers
42=============
43
44.. kernel-doc:: drivers/gpio/gpiolib-sysfs.c
45 :export:
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index 7c94ab50afed..9c20624842b7 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -44,6 +44,7 @@ available subsections can be seen below.
44 uio-howto 44 uio-howto
45 firmware/index 45 firmware/index
46 pinctl 46 pinctl
47 gpio
47 misc_devices 48 misc_devices
48 49
49.. only:: subproject and html 50.. only:: subproject and html