Skip to content

Commit 2ec98f5

Browse files
committed
Merge tag 'gpio-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO updates from Linus Walleij: "This is the big slew of GPIO changes for the v5.3 kernel cycle. This is mostly incremental work this time. Three important things: - The FMC subsystem is deleted through my tree. This happens through GPIO as its demise was discussed in relation to a patch decoupling its GPIO implementation from the standard way of handling GPIO. As it turns out, that is not the only subsystem it reimplements and the authors think it is better do scratch it and start over using the proper kernel subsystems than try to polish the rust shiny. See the commit (ACKed by the maintainers) for details. - Arnd made a small devres patch that was ACKed by Greg and goes into the device core. - SPDX header change colissions may happen, because at times I've seen that quite a lot changed during the -rc:s in regards to SPDX. (It is good stuff, tglx has me convinced, and it is worth the occasional pain.) Apart from this is is nothing controversial or problematic. Summary: Core: - When a gpio_chip request GPIOs from itself, it can now fully control the line characteristics, both machine and consumer flags. This makes a lot of sense, but took some time before I figured out that this is how it has to work. - Several smallish documentation fixes. New drivers: - The PCA953x driver now supports the TI TCA9539. - The DaVinci driver now supports the K3 AM654 SoCs. Driver improvements: - Major overhaul and hardening of the OMAP driver by Russell King. - Starting to move some drivers to the new API passing irq_chip along with the gpio_chip when adding the gpio_chip instead of adding it separately. Unrelated: - Delete the FMC subsystem" * tag 'gpio-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (87 commits) Revert "gpio: tegra: Clean-up debugfs initialisation" gpiolib: Use spinlock_t instead of struct spinlock gpio: stp-xway: allow compile-testing gpio: stp-xway: get rid of the #include <lantiq_soc.h> dependency gpio: stp-xway: improve module clock error handling gpio: stp-xway: simplify error handling in xway_stp_probe() gpiolib: Clarify use of non-sleeping functions gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants gpiolib: Document new gpio_chip.init_valid_mask field Documentation: gpio: Fix reference to gpiod_get_array() gpio: pl061: drop duplicate printing of device name gpio: altera: Pass irqchip when adding gpiochip gpio: siox: Use devm_ managed gpiochip gpio: siox: Add struct device *dev helper variable gpio: siox: Pass irqchip when adding gpiochip drivers: gpio: amd-fch: make resource struct const devres: allow const resource arguments gpio: ath79: Pass irqchip when adding gpiochip gpio: tegra: Clean-up debugfs initialisation gpio: siox: Switch to IRQ_TYPE_NONE ...
2 parents 9640729 + 9b3b623 commit 2ec98f5

75 files changed

Lines changed: 831 additions & 4206 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/gpio/gpio-davinci.txt‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Required Properties:
55
"ti,keystone-gpio": for Keystone 2 66AK2H/K, 66AK2L,
66
66AK2E SoCs
77
"ti,k2g-gpio", "ti,keystone-gpio": for 66AK2G
8+
"ti,am654-gpio", "ti,keystone-gpio": for TI K3 AM654
89

910
- reg: Physical base address of the controller and the size of memory mapped
1011
registers.
@@ -145,3 +146,20 @@ gpio0: gpio@260bf00 {
145146
ti,ngpio = <32>;
146147
ti,davinci-gpio-unbanked = <32>;
147148
};
149+
150+
Example for K3 AM654:
151+
152+
wkup_gpio0: wkup_gpio0@42110000 {
153+
compatible = "ti,am654-gpio", "ti,keystone-gpio";
154+
reg = <0x42110000 0x100>;
155+
gpio-controller;
156+
#gpio-cells = <2>;
157+
interrupt-parent = <&intr_wkup_gpio>;
158+
interrupts = <59 128>, <59 129>, <59 130>, <59 131>;
159+
interrupt-controller;
160+
#interrupt-cells = <2>;
161+
ti,ngpio = <56>;
162+
ti,davinci-gpio-unbanked = <0>;
163+
clocks = <&k3_clks 59 0>;
164+
clock-names = "gpio";
165+
};

‎Documentation/devicetree/bindings/gpio/pl061-gpio.txt‎

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/pl061-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ARM PL061 GPIO controller
8+
9+
maintainers:
10+
- Linus Walleij <linus.walleij@linaro.org>
11+
- Rob Herring <robh@kernel.org>
12+
13+
# We need a select here so we don't match all nodes with 'arm,primecell'
14+
select:
15+
properties:
16+
compatible:
17+
contains:
18+
const: arm,pl061
19+
required:
20+
- compatible
21+
22+
properties:
23+
$nodename:
24+
pattern: "^gpio@[0-9a-f]+$"
25+
26+
compatible:
27+
items:
28+
- const: arm,pl061
29+
- const: arm,primecell
30+
31+
reg:
32+
maxItems: 1
33+
34+
interrupts:
35+
oneOf:
36+
- maxItems: 1
37+
- maxItems: 8
38+
39+
interrupt-controller: true
40+
41+
"#interrupt-cells":
42+
const: 2
43+
44+
clocks:
45+
maxItems: 1
46+
47+
clock-names: true
48+
49+
"#gpio-cells":
50+
const: 2
51+
52+
gpio-controller: true
53+
54+
gpio-ranges:
55+
maxItems: 8
56+
57+
required:
58+
- compatible
59+
- reg
60+
- interrupts
61+
- interrupt-controller
62+
- "#interrupt-cells"
63+
- clocks
64+
- "#gpio-cells"
65+
- gpio-controller
66+
67+
additionalProperties: false
68+
69+
...

‎Documentation/driver-api/gpio/consumer.rst‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,6 @@ To summarize::
283283
gpiod_set_value(desc, 1); default (active high) high
284284
gpiod_set_value(desc, 0); active low high
285285
gpiod_set_value(desc, 1); active low low
286-
gpiod_set_value(desc, 0); default (active high) low
287-
gpiod_set_value(desc, 1); default (active high) high
288286
gpiod_set_value(desc, 0); open drain low
289287
gpiod_set_value(desc, 1); open drain high impedance
290288
gpiod_set_value(desc, 0); open source high impedance
@@ -366,7 +364,7 @@ accessed sequentially.
366364
The functions take three arguments:
367365
* array_size - the number of array elements
368366
* desc_array - an array of GPIO descriptors
369-
* array_info - optional information obtained from gpiod_array_get()
367+
* array_info - optional information obtained from gpiod_get_array()
370368
* value_bitmap - a bitmap to store the GPIOs' values (get) or
371369
a bitmap of values to assign to the GPIOs (set)
372370

‎Documentation/driver-api/gpio/driver.rst‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ means that a pull up or pull-down resistor is available on the output of the
235235
GPIO line, and this resistor is software controlled.
236236

237237
In discrete designs, a pull-up or pull-down resistor is simply soldered on
238-
the circuit board. This is not something we deal or model in software. The
238+
the circuit board. This is not something we deal with or model in software. The
239239
most you will think about these lines is that they will very likely be
240240
configured as open drain or open source (see the section above).
241241

@@ -292,18 +292,18 @@ We can divide GPIO irqchips in two broad categories:
292292

293293
- HIERARCHICAL INTERRUPT CHIPS: this means that each GPIO line has a dedicated
294294
irq line to a parent interrupt controller one level up. There is no need
295-
to inquire the GPIO hardware to figure out which line has figured, but it
296-
may still be necessary to acknowledge the interrupt and set up the
297-
configuration such as edge sensitivity.
295+
to inquire the GPIO hardware to figure out which line has fired, but it
296+
may still be necessary to acknowledge the interrupt and set up configuration
297+
such as edge sensitivity.
298298

299299
Realtime considerations: a realtime compliant GPIO driver should not use
300300
spinlock_t or any sleepable APIs (like PM runtime) as part of its irqchip
301301
implementation.
302302

303-
- spinlock_t should be replaced with raw_spinlock_t [1].
303+
- spinlock_t should be replaced with raw_spinlock_t.[1]
304304
- If sleepable APIs have to be used, these can be done from the .irq_bus_lock()
305305
and .irq_bus_unlock() callbacks, as these are the only slowpath callbacks
306-
on an irqchip. Create the callbacks if needed [2].
306+
on an irqchip. Create the callbacks if needed.[2]
307307

308308

309309
Cascaded GPIO irqchips
@@ -361,7 +361,7 @@ Cascaded GPIO irqchips usually fall in one of three categories:
361361

362362
Realtime considerations: this kind of handlers will be forced threaded on -RT,
363363
and as result the IRQ core will complain that generic_handle_irq() is called
364-
with IRQ enabled and the same work around as for "CHAINED GPIO irqchips" can
364+
with IRQ enabled and the same work-around as for "CHAINED GPIO irqchips" can
365365
be applied.
366366

367367
- NESTED THREADED GPIO IRQCHIPS: these are off-chip GPIO expanders and any
@@ -418,7 +418,7 @@ symbol:
418418

419419
If there is a need to exclude certain GPIO lines from the IRQ domain handled by
420420
these helpers, we can set .irq.need_valid_mask of the gpiochip before
421-
[devm_]gpiochip_add_data() is called. This allocates an .irq.valid_mask with as
421+
``[devm_]gpiochip_add_data()`` is called. This allocates an .irq.valid_mask with as
422422
many bits set as there are GPIO lines in the chip, each bit representing line
423423
0..n-1. Drivers can exclude GPIO lines by clearing bits from this mask. The mask
424424
must be filled in before gpiochip_irqchip_add() or gpiochip_irqchip_add_nested()

‎Documentation/fmc/API.txt‎

Lines changed: 0 additions & 47 deletions
This file was deleted.

‎Documentation/fmc/FMC-and-SDB.txt‎

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)