Skip to content

Commit 7182e89

Browse files
committed
Merge tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski: "We have lots of small changes all over the place, but no huge reworks or new drivers: - use ioread()/iowrite() interfaces instead of raw inb()/outb() in drivers - make irqchips immutable due to the new warning popping up when drivers try to modify the irqchip structures - add new compatibles to dt-bindings for realtek-otto, renesas-rcar and pca95xx - add support for new models to gpio-rcar, gpio-pca953x & gpio-realtek-otto - allow parsing of GPIO hogs represented as children nodes of gpio-uniphier - define a set of common GPIO consumer strings in dt-bindings - shrink code in gpio-ml-ioh by using more devres interfaces - pass arguments to devm_kcalloc() in correct order in gpio-sim - add new helpers for iterating over GPIO firmware nodes and descriptors to gpiolib core and use it in several drivers - drop unused syscon_regmap_lookup_by_compatible() function - correct format specifiers and signedness of variables in GPIO ACPI - drop unneeded error checks in gpio-ftgpio - stop using the deprecated of_gpio.h header in gpio-zevio - drop platform_data support in gpio-max732x - simplify Kconfig dependencies in gpio-vf610 - use raw spinlocks where needed to make PREEMPT_RT happy - fix return values in board files using gpio-pcf857x - convert more drivers to using fwnode instead of of_node - minor fixes and improvements in gpiolib core" * tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (55 commits) gpio: sifive: Make the irqchip immutable gpio: rcar: Make the irqchip immutable gpio: pcf857x: Make the irqchip immutable gpio: pca953x: Make the irqchip immutable gpio: dwapb: Make the irqchip immutable gpio: sim: Use correct order for the parameters of devm_kcalloc() gpio: ml-ioh: Convert to use managed functions pcim* and devm_* gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare gpio: ws16c48: Utilize iomap interface gpio: gpio-mm: Utilize iomap interface gpio: 104-idio-16: Utilize iomap interface gpio: 104-idi-48: Utilize iomap interface gpio: 104-dio-48e: Utilize iomap interface gpio: zevio: drop of_gpio.h header gpio: max77620: Make the irqchip immutable dt-bindings: gpio: pca95xx: add entry for pca6408 gpio: pca953xx: Add support for pca6408 gpio: max732x: Drop unused support for irq and setup code via platform data gpio: vf610: drop the SOC_VF610 dependency for GPIO_VF610 gpio: syscon: Remove usage of syscon_regmap_lookup_by_compatible ...
2 parents f1f88bb + 5a7cb9f commit 7182e89

Some content is hidden

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

61 files changed

+965
-961
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/gpio-consumer-common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Common GPIO lines
8+
9+
maintainers:
10+
- Bartosz Golaszewski <[email protected]>
11+
- Linus Walleij <[email protected]>
12+
13+
description:
14+
Pay attention to using proper GPIO flag (e.g. GPIO_ACTIVE_LOW) for the GPIOs
15+
using inverted signal (e.g. RESETN).
16+
17+
select: true
18+
19+
properties:
20+
enable-gpios:
21+
maxItems: 1
22+
description:
23+
GPIO connected to the enable control pin.
24+
25+
reset-gpios:
26+
description:
27+
GPIO (or GPIOs for power sequence) connected to the device reset pin
28+
(e.g. RESET or RESETN).
29+
30+
powerdown-gpios:
31+
maxItems: 1
32+
description:
33+
GPIO connected to the power down pin (hardware power down or power cut,
34+
e.g. PD or PWDN).
35+
36+
pwdn-gpios:
37+
maxItems: 1
38+
description: Use powerdown-gpios
39+
deprecated: true
40+
41+
wakeup-gpios:
42+
maxItems: 1
43+
description:
44+
GPIO connected to the pin waking up the device from suspend or other
45+
power-saving modes.
46+
47+
allOf:
48+
- if:
49+
properties:
50+
compatible:
51+
contains:
52+
enum:
53+
- mmc-pwrseq-simple
54+
then:
55+
properties:
56+
reset-gpios:
57+
minItems: 1
58+
maxItems: 32
59+
else:
60+
properties:
61+
reset-gpios:
62+
maxItems: 1
63+
64+
additionalProperties: true

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ properties:
3030
- maxim,max7325
3131
- maxim,max7326
3232
- maxim,max7327
33+
- nxp,pca6408
3334
- nxp,pca6416
3435
- nxp,pca9505
3536
- nxp,pca9506

Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ properties:
2828
- enum:
2929
- realtek,rtl8380-gpio
3030
- realtek,rtl8390-gpio
31+
- realtek,rtl9300-gpio
32+
- realtek,rtl9310-gpio
3133
- const: realtek,otto-gpio
3234

33-
reg:
34-
maxItems: 1
35+
reg: true
3536

3637
"#gpio-cells":
3738
const: 2
@@ -50,6 +51,23 @@ properties:
5051
interrupts:
5152
maxItems: 1
5253

54+
if:
55+
properties:
56+
compatible:
57+
contains:
58+
const: realtek,rtl9300-gpio
59+
then:
60+
properties:
61+
reg:
62+
items:
63+
- description: GPIO and interrupt control
64+
- description: interrupt CPU map
65+
else:
66+
properties:
67+
reg:
68+
items:
69+
- description: GPIO and interrupt control
70+
5371
required:
5472
- compatible
5573
- reg
@@ -74,5 +92,17 @@ examples:
7492
interrupt-parent = <&rtlintc>;
7593
interrupts = <23>;
7694
};
95+
- |
96+
gpio@3300 {
97+
compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
98+
reg = <0x3300 0x1c>, <0x3338 0x8>;
99+
gpio-controller;
100+
#gpio-cells = <2>;
101+
ngpios = <24>;
102+
interrupt-controller;
103+
#interrupt-cells = <2>;
104+
interrupt-parent = <&rtlintc>;
105+
interrupts = <13>;
106+
};
77107
78108
...

Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ properties:
5151
- items:
5252
- const: renesas,gpio-r8a779a0 # R-Car V3U
5353

54+
- items:
55+
- enum:
56+
- renesas,gpio-r8a779f0 # R-Car S4-8
57+
- const: renesas,rcar-gen4-gpio # R-Car Gen4
58+
5459
reg:
5560
maxItems: 1
5661

Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ properties:
5252
<child-interrupt-base parent-interrupt-base length> triplets.
5353
$ref: /schemas/types.yaml#/definitions/uint32-matrix
5454

55+
patternProperties:
56+
"^.+-hog(-[0-9]+)?$":
57+
type: object
58+
properties:
59+
gpio-hog: true
60+
gpios: true
61+
input: true
62+
output-high: true
63+
output-low: true
64+
line-name: true
65+
66+
required:
67+
- gpio-hog
68+
- gpios
69+
70+
additionalProperties: false
71+
5572
required:
5673
- compatible
5774
- reg

arch/arm/mach-davinci/board-da830-evm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,10 @@ static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
472472
return 0;
473473
}
474474

475-
static int da830_evm_ui_expander_teardown(struct i2c_client *client, int gpio,
475+
static void da830_evm_ui_expander_teardown(struct i2c_client *client, int gpio,
476476
unsigned ngpio, void *context)
477477
{
478478
gpio_free(gpio + 6);
479-
return 0;
480479
}
481480

482481
static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = {

arch/arm/mach-davinci/board-dm644x-evm.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,13 @@ evm_led_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
365365
return status;
366366
}
367367

368-
static int
368+
static void
369369
evm_led_teardown(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
370370
{
371371
if (evm_led_dev) {
372372
platform_device_unregister(evm_led_dev);
373373
evm_led_dev = NULL;
374374
}
375-
return 0;
376375
}
377376

378377
static struct pcf857x_platform_data pcf_data_u2 = {
@@ -427,7 +426,7 @@ evm_u18_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
427426
return 0;
428427
}
429428

430-
static int
429+
static void
431430
evm_u18_teardown(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
432431
{
433432
gpio_free(gpio + 1);
@@ -438,7 +437,6 @@ evm_u18_teardown(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
438437
device_remove_file(&client->dev, &dev_attr_user_sw);
439438
gpio_free(sw_gpio);
440439
}
441-
return 0;
442440
}
443441

444442
static struct pcf857x_platform_data pcf_data_u18 = {
@@ -487,7 +485,7 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
487485
return 0;
488486
}
489487

490-
static int
488+
static void
491489
evm_u35_teardown(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
492490
{
493491
gpio_free(gpio + 7);
@@ -497,7 +495,6 @@ evm_u35_teardown(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
497495
gpio_free(gpio + 2);
498496
gpio_free(gpio + 1);
499497
gpio_free(gpio + 0);
500-
return 0;
501498
}
502499

503500
static struct pcf857x_platform_data pcf_data_u35 = {

arch/arm/mach-davinci/board-dm646x-evm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,13 @@ static int evm_pcf_setup(struct i2c_client *client, int gpio,
314314
return evm_led_setup(client, gpio+4, 4, c);
315315
}
316316

317-
static int evm_pcf_teardown(struct i2c_client *client, int gpio,
317+
static void evm_pcf_teardown(struct i2c_client *client, int gpio,
318318
unsigned int ngpio, void *c)
319319
{
320320
BUG_ON(ngpio < 8);
321321

322322
evm_sw_teardown(client, gpio, 4, c);
323323
evm_led_teardown(client, gpio+4, 4, c);
324-
325-
return 0;
326324
}
327325

328326
static struct pcf857x_platform_data pcf_data = {

drivers/gpio/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ config GPIO_IOP
353353

354354
config GPIO_IXP4XX
355355
bool "Intel IXP4xx GPIO"
356-
depends on ARM # For <asm/mach-types.h>
357356
depends on ARCH_IXP4XX
357+
depends on OF
358358
select GPIO_GENERIC
359359
select GPIOLIB_IRQCHIP
360360
select IRQ_DOMAIN_HIERARCHY
@@ -363,6 +363,7 @@ config GPIO_IXP4XX
363363
IXP4xx series of chips.
364364

365365
If unsure, say N.
366+
366367
config GPIO_LOGICVC
367368
tristate "Xylon LogiCVC GPIO support"
368369
depends on MFD_SYSCON && OF
@@ -674,10 +675,10 @@ config GPIO_UNIPHIER
674675

675676
config GPIO_VF610
676677
def_bool y
677-
depends on ARCH_MXC && SOC_VF610
678+
depends on ARCH_MXC
678679
select GPIOLIB_IRQCHIP
679680
help
680-
Say yes here to support Vybrid vf610 GPIOs.
681+
Say yes here to support i.MX or Vybrid vf610 GPIOs.
681682

682683
config GPIO_VISCONTI
683684
tristate "Toshiba Visconti GPIO support"

0 commit comments

Comments
 (0)