Skip to content

Commit f97e18a

Browse files
committed
Merge tag 'gpio-updates-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski: "We have a lot of code refactoring using common helpers and ended up removing more lines then we're adding this release cycle. Nothing really stands out, just small updates all over the place. Core GPIOLIB updates: - wake-up poll() in user-space on device unbind - improve fwnode usage - interrupt domain handling improvements - correctly handle the ngpios property in gpio-mmio Driver cleanups: - remove unneeded calls to platform_set_drvdata() all around the place - remove unneeded of_match_ptr() expansions whenever a driver depends on CONFIG_OF - remove redundant calls to dev_err_probe() from gpio-omap and gpio-davinci Driver improvements: - use autopointers and guards from cleanup.h in gpio-sim - shrink code in gpio-sim using some common helpers - convert the idio family of drivers to using gpio-regmap - convert gpio-ws16c48 to using gpio-regmap - use devres to simplify code in gpio-pisosr and gpio-mxc - update gpio-sifive: support IRQ wake, improve interrupt handling, allow building as module - make gpio-ge and gpio-bcm-kona OF-independent (plus some minor tweaks) - add support for new models in gpio-pca953x and gpio-ds4520 - add runtime PM support to gpio-mxc - fix a build warning in gpio-mxs - add support for adding pin ranges to gpio-mlxbf3 - add counter/timer support to gpio-104-dio-48e - switch to dynamic GPIO base allocation in gpio-vf610 - minor oneliners here and there Device-tree bindings updates: - enable the gpio-line-names property in snps,dw-apb and STMPE GPIO - document new models in fsl-imx-gpio, ds4520 and pca95xx - convert the bindings for brcm,kona-gpio to YAML" * tag 'gpio-updates-for-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (94 commits) gpio: pca953x: add support for TCA9538 dt-bindings: gpio: pca95xx: document new tca9538 chip gpio: pca953x: Use i2c_get_match_data() gpio: mlxbf3: use capital "OR" for multiple licenses in SPDX gpio: pcf857x: Extend match data support for OF tables gpio: vf610: switch to dynamic allocat GPIO base gpiolib: provide and use gpiod_line_state_notify() gpio: cdev: wake up lineevent poll() on device unbind gpio: cdev: wake up linereq poll() on device unbind gpio: cdev: wake up chardev poll() on device unbind gpiolib: add a second blocking notifier to struct gpio_device gpio: cdev: open-code to_gpio_chardev_data() gpiolib: rename the gpio_device notifier gpio: mlxbf3: Support add_pin_ranges() gpio: mxc: Use helper function devm_clk_get_optional_enabled() gpio: pca9570: fix kerneldoc gpio: sim: simplify code with cleanup helpers gpio: sim: replace memmove() + strstrip() with skip_spaces() + strim() gpio: sim: simplify gpio_sim_device_config_live_store() gpio: mxc: release the parent IRQ in runtime suspend ...
2 parents 41e97d7 + 3d0957b commit f97e18a

Some content is hidden

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

88 files changed

+1668
-2068
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/adi,ds4520-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: DS4520 I2C GPIO expander
8+
9+
maintainers:
10+
- Okan Sahin <okan.sahin@analog.com>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- adi,ds4520-gpio
16+
17+
reg:
18+
maxItems: 1
19+
20+
gpio-controller: true
21+
22+
"#gpio-cells":
23+
const: 2
24+
25+
ngpios:
26+
minimum: 1
27+
maximum: 9
28+
29+
required:
30+
- compatible
31+
- reg
32+
- gpio-controller
33+
- "#gpio-cells"
34+
- ngpios
35+
36+
additionalProperties: false
37+
38+
examples:
39+
- |
40+
i2c {
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
gpio@50 {
45+
compatible = "adi,ds4520-gpio";
46+
reg = <0x50>;
47+
ngpios = <9>;
48+
gpio-controller;
49+
#gpio-cells = <2>;
50+
};
51+
};

Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/brcm,kona-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Broadcom Kona family GPIO controller
8+
9+
description:
10+
The Broadcom GPIO Controller IP can be configured prior to synthesis to
11+
support up to 8 banks of 32 GPIOs where each bank has its own IRQ. The
12+
GPIO controller only supports edge, not level, triggering of interrupts.
13+
14+
maintainers:
15+
- Ray Jui <rjui@broadcom.com>
16+
17+
properties:
18+
compatible:
19+
items:
20+
- enum:
21+
- brcm,bcm11351-gpio
22+
- brcm,bcm21664-gpio
23+
- brcm,bcm23550-gpio
24+
- const: brcm,kona-gpio
25+
26+
reg:
27+
maxItems: 1
28+
29+
interrupts:
30+
minItems: 4
31+
maxItems: 6
32+
description:
33+
The interrupt outputs from the controller. There is one GPIO interrupt
34+
per GPIO bank. The number of interrupts listed depends on the number of
35+
GPIO banks on the SoC. The interrupts must be ordered by bank, starting
36+
with bank 0. There is always a 1:1 mapping between banks and IRQs.
37+
38+
'#gpio-cells':
39+
const: 2
40+
41+
'#interrupt-cells':
42+
const: 2
43+
44+
gpio-controller: true
45+
46+
interrupt-controller: true
47+
48+
required:
49+
- compatible
50+
- reg
51+
- interrupts
52+
- '#gpio-cells'
53+
- '#interrupt-cells'
54+
- gpio-controller
55+
- interrupt-controller
56+
57+
allOf:
58+
- if:
59+
properties:
60+
compatible:
61+
contains:
62+
const: brcm,bcm11351-gpio
63+
then:
64+
properties:
65+
interrupts:
66+
minItems: 6
67+
- if:
68+
properties:
69+
compatible:
70+
contains:
71+
enum:
72+
- brcm,bcm21664-gpio
73+
- brcm,bcm23550-gpio
74+
then:
75+
properties:
76+
interrupts:
77+
maxItems: 4
78+
79+
additionalProperties: false
80+
81+
examples:
82+
- |
83+
#include <dt-bindings/interrupt-controller/arm-gic.h>
84+
#include <dt-bindings/interrupt-controller/irq.h>
85+
86+
gpio@35003000 {
87+
compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio";
88+
reg = <0x35003000 0x800>;
89+
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
90+
<GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
91+
<GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
92+
<GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
93+
<GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
94+
<GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
95+
#gpio-cells = <2>;
96+
#interrupt-cells = <2>;
97+
gpio-controller;
98+
interrupt-controller;
99+
};
100+
...

Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ properties:
3232
- fsl,imx6sx-gpio
3333
- fsl,imx6ul-gpio
3434
- fsl,imx7d-gpio
35+
- fsl,imx8dxl-gpio
3536
- fsl,imx8mm-gpio
3637
- fsl,imx8mn-gpio
3738
- fsl,imx8mp-gpio
3839
- fsl,imx8mq-gpio
40+
- fsl,imx8qm-gpio
3941
- fsl,imx8qxp-gpio
4042
- fsl,imxrt1050-gpio
4143
- fsl,imxrt1170-gpio

Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ properties:
6666
- ti,tca6408
6767
- ti,tca6416
6868
- ti,tca6424
69+
- ti,tca9538
6970
- ti,tca9539
7071
- ti,tca9554
7172

Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ patternProperties:
6161
'#gpio-cells':
6262
const: 2
6363

64+
gpio-line-names:
65+
minItems: 1
66+
maxItems: 32
67+
6468
ngpios:
6569
default: 32
6670
minimum: 1

Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ properties:
2828

2929
gpio-controller: true
3030

31+
gpio-line-names:
32+
minItems: 1
33+
maxItems: 24
34+
3135
interrupt-controller: true
3236

3337
st,norequest-mask:

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4195,7 +4195,7 @@ BROADCOM KONA GPIO DRIVER
41954195
M: Ray Jui <rjui@broadcom.com>
41964196
R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
41974197
S: Supported
4198-
F: Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt
4198+
F: Documentation/devicetree/bindings/gpio/brcm,kona-gpio.yaml
41994199
F: drivers/gpio/gpio-bcm-kona.c
42004200

42014201
BROADCOM MPI3 STORAGE CONTROLLER DRIVER

drivers/gpio/Kconfig

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ config GPIO_MAX730X
111111

112112
config GPIO_IDIO_16
113113
tristate
114+
select REGMAP_IRQ
115+
select GPIOLIB_IRQCHIP
116+
select GPIO_REGMAP
114117
help
115118
Enables support for the idio-16 library functions. The idio-16 library
116119
provides functions to facilitate communication with devices within the
@@ -191,7 +194,7 @@ config GPIO_RASPBERRYPI_EXP
191194

192195
config GPIO_BCM_KONA
193196
bool "Broadcom Kona GPIO"
194-
depends on OF_GPIO && (ARCH_BCM_MOBILE || COMPILE_TEST)
197+
depends on ARCH_BCM_MOBILE || COMPILE_TEST
195198
help
196199
Turn on GPIO support for Broadcom "Kona" chips.
197200

@@ -283,7 +286,7 @@ config GPIO_EXAR
283286

284287
config GPIO_GE_FPGA
285288
bool "GE FPGA based GPIO"
286-
depends on GE_FPGA
289+
depends on GE_FPGA || COMPILE_TEST
287290
select GPIO_GENERIC
288291
help
289292
Support for common GPIO functionality provided on some GE Single Board
@@ -564,7 +567,7 @@ config GPIO_SAMA5D2_PIOBU
564567
maintain their value during backup/self-refresh.
565568

566569
config GPIO_SIFIVE
567-
bool "SiFive GPIO support"
570+
tristate "SiFive GPIO support"
568571
depends on OF_GPIO
569572
select IRQ_DOMAIN_HIERARCHY
570573
select GPIO_GENERIC
@@ -858,6 +861,7 @@ config GPIO_104_DIO_48E
858861
select REGMAP_IRQ
859862
select GPIOLIB_IRQCHIP
860863
select GPIO_I8255
864+
select I8254
861865
help
862866
Enables GPIO support for the ACCES 104-DIO-48E series (104-DIO-48E,
863867
104-DIO-24E). The base port addresses for the devices may be
@@ -868,7 +872,7 @@ config GPIO_104_IDIO_16
868872
tristate "ACCES 104-IDIO-16 GPIO support"
869873
depends on PC104
870874
select ISA_BUS_API
871-
select GPIOLIB_IRQCHIP
875+
select REGMAP_MMIO
872876
select GPIO_IDIO_16
873877
help
874878
Enables GPIO support for the ACCES 104-IDIO-16 family (104-IDIO-16,
@@ -994,7 +998,10 @@ config GPIO_WINBOND
994998
config GPIO_WS16C48
995999
tristate "WinSystems WS16C48 GPIO support"
9961000
select ISA_BUS_API
1001+
select REGMAP_IRQ
1002+
select REGMAP_MMIO
9971003
select GPIOLIB_IRQCHIP
1004+
select GPIO_REGMAP
9981005
help
9991006
Enables GPIO support for the WinSystems WS16C48. The base port
10001007
addresses for the devices may be configured via the base module
@@ -1028,6 +1035,17 @@ config GPIO_FXL6408
10281035
To compile this driver as a module, choose M here: the module will
10291036
be called gpio-fxl6408.
10301037

1038+
config GPIO_DS4520
1039+
tristate "DS4520 I2C GPIO expander"
1040+
select REGMAP_I2C
1041+
select GPIO_REGMAP
1042+
help
1043+
GPIO driver for ADI DS4520 I2C-based GPIO expander.
1044+
Say yes here to enable the GPIO driver for the ADI DS4520 chip.
1045+
1046+
To compile this driver as a module, choose M here: the module will
1047+
be called gpio-ds4520.
1048+
10311049
config GPIO_GW_PLD
10321050
tristate "Gateworks PLD GPIO Expander"
10331051
depends on OF_GPIO
@@ -1640,7 +1658,7 @@ config GPIO_PCH
16401658

16411659
config GPIO_PCI_IDIO_16
16421660
tristate "ACCES PCI-IDIO-16 GPIO support"
1643-
select GPIOLIB_IRQCHIP
1661+
select REGMAP_MMIO
16441662
select GPIO_IDIO_16
16451663
help
16461664
Enables GPIO support for the ACCES PCI-IDIO-16. An interrupt is
@@ -1650,7 +1668,10 @@ config GPIO_PCI_IDIO_16
16501668

16511669
config GPIO_PCIE_IDIO_24
16521670
tristate "ACCES PCIe-IDIO-24 GPIO support"
1671+
select REGMAP_IRQ
1672+
select REGMAP_MMIO
16531673
select GPIOLIB_IRQCHIP
1674+
select GPIO_REGMAP
16541675
help
16551676
Enables GPIO support for the ACCES PCIe-IDIO-24 family (PCIe-IDIO-24,
16561677
PCIe-IDI-24, PCIe-IDO-24, PCIe-IDIO-12). An interrupt is generated

drivers/gpio/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ obj-$(CONFIG_GPIO_DA9052) += gpio-da9052.o
5252
obj-$(CONFIG_GPIO_DA9055) += gpio-da9055.o
5353
obj-$(CONFIG_GPIO_DAVINCI) += gpio-davinci.o
5454
obj-$(CONFIG_GPIO_DLN2) += gpio-dln2.o
55+
obj-$(CONFIG_GPIO_DS4520) += gpio-ds4520.o
5556
obj-$(CONFIG_GPIO_DWAPB) += gpio-dwapb.o
5657
obj-$(CONFIG_GPIO_EIC_SPRD) += gpio-eic-sprd.o
5758
obj-$(CONFIG_GPIO_ELKHARTLAKE) += gpio-elkhartlake.o

0 commit comments

Comments
 (0)