Skip to content

Commit 17bbc46

Browse files
committed
Merge tag 'gpio-updates-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski: "A rather small update, there are no new drivers, just improvements and refactoring in existing ones. Thanks to migrating of several drivers to using generalized APIs and dropping of OF interfaces in favor of using software nodes we're actually removing more code than we're adding. Core GPIOLIB: - drop several OF interfaces after moving a significant part of the code to using software nodes - remove more interfaces referring to the global GPIO numberspace that we're getting rid of - improvements in the gpio-regmap library - add helper for GPIO device reference counting - remove unused APIs - minor tweaks like sorting headers alphabetically Extended support in existing drivers: - add support for Tegra 234 PMC to gpio-tegra186 Driver improvements: - migrate the 104-dio/idi family of drivers to using the regmap-irq API - migrate gpio-i8255 and gpio-mm to the GPIO regmap API - clean-ups in gpio-pca953x - remove duplicate assignments of of_gpio_n_cells in gpio-davinci, gpio-ge, gpio-xilinx, gpio-zevio and gpio-wcd934x - improvements to gpio-pcf857x: implement get/set_multiple callbacks, use generic device properties instead of OF + minor tweaks - fix OF-related header includes and Kconfig dependencies in gpio-zevio - dynamically allocate the GPIO base in gpio-omap - use a dedicated printf specifier for printing fwnode info in gpio-sim - use dev_name() for the GPIO chip label in gpio-vf610 - other minor tweaks and fixes Documentation: - remove mentions of legacy API from comments in various places - convert the DT binding documents to YAML schema for Fujitsu MB86S7x, Unisoc GPIO and Unisoc EIC - document the Unisoc UMS512 controller in DT bindings" * tag 'gpio-updates-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (54 commits) gpio: sim: Use %pfwP specifier instead of calling fwnode API directly gpio: tegra186: remove unneeded loop in tegra186_gpio_init_route_mapping() gpiolib: of: Move enum of_gpio_flags to its only user gpio: mvebu: Use IS_REACHABLE instead of IS_ENABLED for CONFIG_PWM gpio: zevio: Add missing header gpio: Get rid of gpio_to_chip() gpio: pcf857x: Drop unneeded explicit casting gpio: pcf857x: Make use of device properties gpio: pcf857x: Get rid of legacy platform data gpio: rockchip: Do not mention legacy API in the code gpio: wcd934x: Remove duplicate assignment of of_gpio_n_cells gpio: zevio: Use proper headers and drop OF_GPIO dependency gpio: zevio: Remove duplicate assignment of of_gpio_n_cells gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells dt-bindings: gpio: Add compatible string for Unisoc UMS512 dt-bindings: gpio: Convert Unisoc EIC controller binding to yaml dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml gpio: ge: Remove duplicate assignment of of_gpio_n_cells gpio: davinci: Remove duplicate assignment of of_gpio_n_cells gpio: omap: use dynamic allocation of base ...
2 parents 13e574b + 4827aae commit 17bbc46

Some content is hidden

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

49 files changed

+886
-1690
lines changed

Documentation/devicetree/bindings/gpio/fujitsu,mb86s70-gpio.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/fujitsu,mb86s70-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Fujitsu MB86S7x GPIO Controller
8+
9+
maintainers:
10+
- Jassi Brar <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- items:
16+
- const: socionext,synquacer-gpio
17+
- const: fujitsu,mb86s70-gpio
18+
- const: fujitsu,mb86s70-gpio
19+
20+
reg:
21+
maxItems: 1
22+
23+
'#gpio-cells':
24+
const: 2
25+
26+
gpio-controller: true
27+
gpio-line-names: true
28+
29+
clocks:
30+
maxItems: 1
31+
32+
required:
33+
- compatible
34+
- reg
35+
- '#gpio-cells'
36+
- gpio-controller
37+
- clocks
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
gpio@31000000 {
44+
compatible = "fujitsu,mb86s70-gpio";
45+
reg = <0x31000000 0x10000>;
46+
gpio-controller;
47+
#gpio-cells = <2>;
48+
clocks = <&clk 0 2 1>;
49+
};
50+
...

Documentation/devicetree/bindings/gpio/gpio-eic-sprd.txt

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

Documentation/devicetree/bindings/gpio/gpio-sprd.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2022 Unisoc Inc.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/gpio/sprd,gpio-eic.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Unisoc EIC controller
9+
10+
maintainers:
11+
- Orson Zhai <[email protected]>
12+
- Baolin Wang <[email protected]>
13+
- Chunyan Zhang <[email protected]>
14+
15+
description: |
16+
The EIC is the abbreviation of external interrupt controller, which can
17+
be used only in input mode. The Spreadtrum platform has 2 EIC controllers,
18+
one is in digital chip, and another one is in PMIC. The digital chip EIC
19+
controller contains 4 sub-modules, i.e. EIC-debounce, EIC-latch, EIC-async and
20+
EIC-sync. But the PMIC EIC controller contains only one EIC-debounce sub-
21+
module.
22+
23+
The EIC-debounce sub-module provides up to 8 source input signal
24+
connections. A debounce mechanism is used to capture the input signals'
25+
stable status (millisecond resolution) and a single-trigger mechanism
26+
is introduced into this sub-module to enhance the input event detection
27+
reliability. In addition, this sub-module's clock can be shut off
28+
automatically to reduce power dissipation. Moreover the debounce range
29+
is from 1ms to 4s with a step size of 1ms. The input signal will be
30+
ignored if it is asserted for less than 1 ms.
31+
32+
The EIC-latch sub-module is used to latch some special power down signals
33+
and generate interrupts, since the EIC-latch does not depend on the APB
34+
clock to capture signals.
35+
36+
The EIC-async sub-module uses a 32kHz clock to capture the short signals
37+
(microsecond resolution) to generate interrupts by level or edge trigger.
38+
39+
The EIC-sync is similar with GPIO's input function, which is a synchronized
40+
signal input register. It can generate interrupts by level or edge trigger
41+
when detecting input signals.
42+
43+
properties:
44+
compatible:
45+
oneOf:
46+
- enum:
47+
- sprd,sc9860-eic-debounce
48+
- sprd,sc9860-eic-latch
49+
- sprd,sc9860-eic-async
50+
- sprd,sc9860-eic-sync
51+
- sprd,sc2731-eic
52+
- items:
53+
- enum:
54+
- sprd,ums512-eic-debounce
55+
- const: sprd,sc9860-eic-debounce
56+
- items:
57+
- enum:
58+
- sprd,ums512-eic-latch
59+
- const: sprd,sc9860-eic-latch
60+
- items:
61+
- enum:
62+
- sprd,ums512-eic-async
63+
- const: sprd,sc9860-eic-async
64+
- items:
65+
- enum:
66+
- sprd,ums512-eic-sync
67+
- const: sprd,sc9860-eic-sync
68+
- items:
69+
- enum:
70+
- sprd,sc2730-eic
71+
- const: sprd,sc2731-eic
72+
73+
reg:
74+
minItems: 1
75+
maxItems: 3
76+
description:
77+
EIC controller can support maximum 3 banks which has its own
78+
address base.
79+
80+
gpio-controller: true
81+
82+
"#gpio-cells":
83+
const: 2
84+
85+
interrupt-controller: true
86+
87+
"#interrupt-cells":
88+
const: 2
89+
90+
interrupts:
91+
maxItems: 1
92+
description:
93+
The interrupt shared by all GPIO lines for this controller.
94+
95+
required:
96+
- compatible
97+
- reg
98+
- gpio-controller
99+
- "#gpio-cells"
100+
- interrupt-controller
101+
- "#interrupt-cells"
102+
- interrupts
103+
104+
additionalProperties: false
105+
106+
examples:
107+
- |
108+
#include <dt-bindings/interrupt-controller/arm-gic.h>
109+
110+
soc {
111+
#address-cells = <2>;
112+
#size-cells = <2>;
113+
114+
eic_debounce: gpio@40210000 {
115+
compatible = "sprd,sc9860-eic-debounce";
116+
reg = <0 0x40210000 0 0x80>;
117+
gpio-controller;
118+
#gpio-cells = <2>;
119+
interrupt-controller;
120+
#interrupt-cells = <2>;
121+
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
122+
};
123+
};
124+
...
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2022 Unisoc Inc.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Unisoc GPIO controller
9+
10+
maintainers:
11+
- Orson Zhai <[email protected]>
12+
- Baolin Wang <[email protected]>
13+
- Chunyan Zhang <[email protected]>
14+
15+
description: |
16+
The controller's registers are organized as sets of sixteen 16-bit
17+
registers with each set controlling a bank of up to 16 pins. A single
18+
interrupt is shared for all of the banks handled by the controller.
19+
20+
properties:
21+
compatible:
22+
oneOf:
23+
- const: sprd,sc9860-gpio
24+
- items:
25+
- enum:
26+
- sprd,ums512-gpio
27+
- const: sprd,sc9860-gpio
28+
29+
reg:
30+
maxItems: 1
31+
32+
gpio-controller: true
33+
34+
"#gpio-cells":
35+
const: 2
36+
37+
interrupt-controller: true
38+
39+
"#interrupt-cells":
40+
const: 2
41+
42+
interrupts:
43+
maxItems: 1
44+
description: The interrupt shared by all GPIO lines for this controller.
45+
46+
required:
47+
- compatible
48+
- reg
49+
- gpio-controller
50+
- "#gpio-cells"
51+
- interrupt-controller
52+
- "#interrupt-cells"
53+
- interrupts
54+
55+
additionalProperties: false
56+
57+
examples:
58+
- |
59+
#include <dt-bindings/interrupt-controller/arm-gic.h>
60+
61+
soc {
62+
#address-cells = <2>;
63+
#size-cells = <2>;
64+
65+
ap_gpio: gpio@40280000 {
66+
compatible = "sprd,sc9860-gpio";
67+
reg = <0 0x40280000 0 0x1000>;
68+
gpio-controller;
69+
#gpio-cells = <2>;
70+
interrupt-controller;
71+
#interrupt-cells = <2>;
72+
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
73+
};
74+
};
75+
...

0 commit comments

Comments
 (0)