Commit 8c23f235 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gpio-fixes-for-v5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - make the irqchip immutable in gpio-realtek-otto

 - fix error code propagation in gpio-winbond

 - fix device removing in gpio-grgpio

 - fix a typo in gpio-mxs which indicates the driver is for a different
   model

 - documentation fixes

 - MAINTAINERS file updates

* tag 'gpio-fixes-for-v5.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: mxs: Fix header comment
  gpio: Fix kernel-doc comments to nested union
  gpio: grgpio: Fix device removing
  gpio: winbond: Fix error code in winbond_gpio_get()
  gpio: realtek-otto: Make the irqchip immutable
  docs: driver-api: gpio: Fix filename mismatch
  MAINTAINERS: add include/dt-bindings/gpio to GPIO SUBSYSTEM
parents 6a0a17e6 b0d47318
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ This document explains how GPIOs can be assigned to given devices and functions.

Note that it only applies to the new descriptor-based interface. For a
description of the deprecated integer-based GPIO interface please refer to
gpio-legacy.txt (actually, there is no real mapping possible with the old
legacy.rst (actually, there is no real mapping possible with the old
interface; you just fetch an integer from somewhere and request the
corresponding GPIO).

+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ GPIO Descriptor Consumer Interface

This document describes the consumer interface of the GPIO framework. Note that
it describes the new descriptor-based interface. For a description of the
deprecated integer-based GPIO interface please refer to gpio-legacy.txt.
deprecated integer-based GPIO interface please refer to legacy.rst.


Guidelines for GPIOs consumers
@@ -78,7 +78,7 @@ whether the line is configured active high or active low (see

The two last flags are used for use cases where open drain is mandatory, such
as I2C: if the line is not already configured as open drain in the mappings
(see board.txt), then open drain will be enforced anyway and a warning will be
(see board.rst), then open drain will be enforced anyway and a warning will be
printed that the board configuration needs to be updated to match the use case.

Both functions return either a valid GPIO descriptor, or an error code checkable
@@ -270,7 +270,7 @@ driven.
The same is applicable for open drain or open source output lines: those do not
actively drive their output high (open drain) or low (open source), they just
switch their output to a high impedance value. The consumer should not need to
care. (For details read about open drain in driver.txt.)
care. (For details read about open drain in driver.rst.)

With this, all the gpiod_set_(array)_value_xxx() functions interpret the
parameter "value" as "asserted" ("1") or "de-asserted" ("0"). The physical line
+3 −3
Original line number Diff line number Diff line
@@ -14,12 +14,12 @@ Due to the history of GPIO interfaces in the kernel, there are two different
ways to obtain and use GPIOs:

  - The descriptor-based interface is the preferred way to manipulate GPIOs,
    and is described by all the files in this directory excepted gpio-legacy.txt.
    and is described by all the files in this directory excepted legacy.rst.
  - The legacy integer-based interface which is considered deprecated (but still
    usable for compatibility reasons) is documented in gpio-legacy.txt.
    usable for compatibility reasons) is documented in legacy.rst.

The remainder of this document applies to the new descriptor-based interface.
gpio-legacy.txt contains the same information applied to the legacy
legacy.rst contains the same information applied to the legacy
integer-based interface.


+1 −0
Original line number Diff line number Diff line
@@ -8498,6 +8498,7 @@ F: Documentation/devicetree/bindings/gpio/
F:	Documentation/driver-api/gpio/
F:	drivers/gpio/
F:	include/asm-generic/gpio.h
F:	include/dt-bindings/gpio/
F:	include/linux/gpio.h
F:	include/linux/gpio/
F:	include/linux/of_gpio.h
+1 −13
Original line number Diff line number Diff line
@@ -434,25 +434,13 @@ static int grgpio_probe(struct platform_device *ofdev)
static int grgpio_remove(struct platform_device *ofdev)
{
	struct grgpio_priv *priv = platform_get_drvdata(ofdev);
	int i;
	int ret = 0;

	if (priv->domain) {
		for (i = 0; i < GRGPIO_MAX_NGPIO; i++) {
			if (priv->uirqs[i].refcnt != 0) {
				ret = -EBUSY;
				goto out;
			}
		}
	}

	gpiochip_remove(&priv->gc);

	if (priv->domain)
		irq_domain_remove(priv->domain);

out:
	return ret;
	return 0;
}

static const struct of_device_id grgpio_match[] = {
Loading