Commit 1d8ce0e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull GPIO updates from Linus Walleij:
 "This is the bulk of GPIO changes for the v5.9 kernel cycle.

  There is nothing too exciting in it, but a new macro that fixes a
  build failure on a minor ARM32 platform that appeared yesterday is
  part of it so we better merge it.

  Core changes:

   - Introduce the for_each_requested_gpio() macro to help in dependent
     code all over the place. Also patch a few locations to use it while
     we are at it.

   - Split out the sysfs code into its own file.

   - Split out the character device code into its own file, then make a
     set of refactorings and improvements to this code. We are setting
     the stage to revamp the userspace API a bit in the next cycle.

   - Fix a whole slew of kerneldoc that was wrong or missing.

  New drivers:

   - The PCA953x driver now supports the PCAL9535.

  Driver improvements:

   - A host of incremental modernizations and improvements to the
     PCA953x driver.

   - Incremental improvements to the Xilinx Zynq driver.

   - Some improvements to the GPIO aggregator driver.

   - I ran all over the place switching all threaded and other drivers
     requesting their own IRQ while using the core GPIO IRQ helpers to
     pass the GPIO irq chip as a template instead of calling the
     explicit set-up functions. Next merge window we may retire the old
     code altogether"

* tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (97 commits)
  gpio: wcove: Request IRQ after all initialisation done
  gpio: crystalcove: Free IRQ on error path
  gpio: pca953x: Request IRQ after all initialisation done
  gpio: don't use same lockdep class for all devm_gpiochip_add_data users
  gpio: max732x: Use irqchip template
  gpio: stmpe: Move chip registration
  gpio: rcar: Use irqchip template
  gpio: regmap: fix type clash
  gpio: Correct kernel-doc inconsistency
  gpio: pci-idio-16: Use irqchip template
  gpio: pcie-idio-24: Use irqchip template
  gpio: 104-idio-16: Use irqchip template
  gpio: 104-idi-48: Use irqchip template
  gpio: 104-dio-48e: Use irqchip template
  gpio: ws16c48: Use irqchip template
  gpio: omap: improve coding style for pin config flags
  gpio: dln2: Use irqchip template
  gpio: sch: Add a blank line between declaration and code
  gpio: sch: changed every 'unsigned' to 'unsigned int'
  gpio: ich: changed every 'unsigned' to 'unsigned int'
  ...
parents 58552408 22cc4220
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ Required properties:
	nxp,pca9698
	nxp,pcal6416
	nxp,pcal6524
	nxp,pcal9535
	nxp,pcal9555a
	maxim,max7310
	maxim,max7312
+47 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio/gpio-pca9570.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: PCA9570 I2C GPO expander

maintainers:
  - Sungbo Eo <mans0n@gorani.run>

properties:
  compatible:
    enum:
      - nxp,pca9570

  reg:
    maxItems: 1

  gpio-controller: true

  '#gpio-cells':
    const: 2

required:
  - compatible
  - reg
  - gpio-controller
  - "#gpio-cells"

additionalProperties: false

examples:
  - |
    i2c0 {
        #address-cells = <1>;
        #size-cells = <0>;

        gpio@24 {
            compatible = "nxp,pca9570";
            reg = <0x24>;
            gpio-controller;
            #gpio-cells = <2>;
        };
    };

...
+3 −1
Original line number Diff line number Diff line
@@ -6,7 +6,9 @@ Required properties:
			  - First cell is the GPIO line number
			  - Second cell is used to specify optional
			    parameters (unused)
- compatible		: Should be "xlnx,zynq-gpio-1.0" or "xlnx,zynqmp-gpio-1.0"
- compatible		: Should be "xlnx,zynq-gpio-1.0" or
			  "xlnx,zynqmp-gpio-1.0" or "xlnx,versal-gpio-1.0
			  or "xlnx,pmc-gpio-1.0
- clocks		: Clock specifier (see clock bindings for details)
- gpio-controller	: Marks the device node as a GPIO controller.
- interrupts		: Interrupt specifier (see interrupt bindings for
+7 −0
Original line number Diff line number Diff line
@@ -89,6 +89,13 @@ hardware descriptions such as device tree or ACPI:
  Consumer Electronics Control bus using only GPIO. It is used to communicate
  with devices on the HDMI bus.

- gpio-charger: drivers/power/supply/gpio-charger.c is used if you need to do
  battery charging and all you have to go by to check the presence of the
  AC charger or more complex tasks such as indicating charging status using
  nothing but GPIO lines, this driver provides that and also a clearly defined
  way to pass the charging parameters from hardware descriptions such as the
  device tree.

Apart from this there are special GPIO drivers in subsystems like MMC/SD to
read card detect and write protect GPIO lines, and in the TTY serial subsystem
to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The
+10 −2
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ config GPIO_MXS

config GPIO_OCTEON
	tristate "Cavium OCTEON GPIO"
	depends on GPIOLIB && CAVIUM_OCTEON_SOC
	depends on CAVIUM_OCTEON_SOC
	default y
	help
	  Say yes here to support the on-chip GPIO lines on the OCTEON
@@ -962,6 +962,14 @@ config GPIO_PCA953X_IRQ
	  Say yes here to enable the pca953x to be used as an interrupt
	  controller. It requires the driver to be built in the kernel.

config GPIO_PCA9570
	tristate "PCA9570 4-Bit I2C GPO expander"
	help
	  Say yes here to enable the GPO driver for the NXP PCA9570 chip.

	  To compile this driver as a module, choose M here: the module will
	  be called gpio-pca9570.

config GPIO_PCF857X
	tristate "PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders"
	select GPIOLIB_IRQCHIP
@@ -1117,7 +1125,7 @@ config GPIO_DLN2

config HTC_EGPIO
	bool "HTC EGPIO support"
	depends on GPIOLIB && ARM
	depends on ARM
	help
	  This driver supports the CPLD egpio chip present on
	  several HTC phones.  It provides basic support for input
Loading