Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cd04d29 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 v4.8 kernel cycle.  The big
  news is the completion of the chardev ABI which I'm very happy about
  and apart from that it's an ordinary, quite busy cycle.  The details
  are below.

  The patches are tested in linux-next for some time, patches to other
  subsystem mostly have ACKs.

  I got overly ambitious with configureing lines as input for IRQ lines
  but it turns out that some controllers have their interrupt-enable and
  input-enabling in orthogonal settings so the assumption that all IRQ
  lines are input lines does not hold.  Oh well, revert and back to the
  drawing board with that.

  Core changes:

   - The big item is of course the completion of the character device
     ABI.  It has now replaced and surpassed the former unmaintainable
     sysfs ABI: we can now hammer (bitbang) individual lines or sets of
     lines and read individual lines or sets of lines from userspace,
     and we can also register to listen to GPIO events from userspace.

     As a tie-in we have two new tools in tools/gpio: gpio-hammer and
     gpio-event-mon that illustrate the proper use of the new ABI.  As
     someone said: the wild west days of GPIO are now over.

   - Continued to remove the pointless ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB
     Kconfig symbols.  I'm patching hexagon, openrisc, powerpc, sh,
     unicore, ia64 and microblaze.  These are either ACKed by their
     maintainers or patched anyways after a grace period and no response
     from maintainers.

     Some archs (ARM) come in from their trees, and others (x86) are
     still not fixed, so I might send a second pull request to root it
     out later in this merge window, or just defer to v4.9.

   - The GPIO tools are moved to the tools build system.

  New drivers:

   - New driver for the MAX77620/MAX20024.

   - New driver for the Intel Merrifield.

   - Enabled PCA953x for the TI PCA9536.

   - Enabled PCA953x for the Intel Edison.

   - Enabled R8A7792 in the RCAR driver.

  Driver improvements:

   - The STMPE and F7188x now supports the .get_direction() callback.

   - The Xilinx driver supports setting multiple lines at once.

   - ACPI support for the Vulcan GPIO controller.

   - The MMIO GPIO driver supports device tree probing.

   - The Acer One 10 is supported through the _DEP ACPI attribute.

  Cleanups:

   - A major cleanup of the OF/DT support code.  It is way easier to
     read and understand now, probably this improves performance too.

   - Drop a few redundant .owner assignments.

   - Remove CLPS711x boardfile support: we are 100% DT"

* tag 'gpio-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (67 commits)
  MAINTAINERS: Add INTEL MERRIFIELD GPIO entry
  gpio: dwapb: add missing fwnode_handle_put() in dwapb_gpio_get_pdata()
  gpio: merrifield: Protect irq_ack() and gpio_set() by lock
  gpio: merrifield: Introduce GPIO driver to support Merrifield
  gpio: intel-mid: Make it depend to X86_INTEL_MID
  gpio: intel-mid: Sort header block alphabetically
  gpio: intel-mid: Remove potentially harmful code
  gpio: rcar: add R8A7792 support
  gpiolib: remove duplicated include from gpiolib.c
  Revert "gpio: convince line to become input in irq helper"
  gpiolib: of_find_gpio(): Don't discard errors
  gpio: of: Allow overriding the device node
  gpio: free handles in fringe cases
  gpio: tps65218: Add platform_device_id table
  gpio: max77620: get gpio value based on direction
  gpio: lynxpoint: avoid potential warning on error path
  tools/gpio: add install section
  tools/gpio: move to tools buildsystem
  gpio: intel-mid: switch to devm_gpiochip_add_data()
  gpio: 74x164: Use spi_write() helper instead of open coding
  ...
parents 9c1958fc 224f9e6d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
* ARM Cirrus Logic CLPS711X SYSFLG1 MCTRL GPIOs

Required properties:
- compatible: Should contain "cirrus,clps711x-mctrl-gpio".
- compatible: Should contain "cirrus,ep7209-mctrl-gpio".
- gpio-controller: Marks the device node as a gpio controller.
- #gpio-cells: Should be two. The first cell is the pin number and
  the second cell is used to specify the gpio polarity:
@@ -11,7 +11,7 @@ Required properties:
Example:
	sysgpio: sysgpio {
		compatible = "cirrus,ep7312-mctrl-gpio",
			     "cirrus,clps711x-mctrl-gpio";
			     "cirrus,ep7209-mctrl-gpio";
		gpio-controller;
		#gpio-cells = <2>;
	};
+2 −2
Original line number Diff line number Diff line
Cirrus Logic CLPS711X GPIO controller

Required properties:
- compatible: Should be "cirrus,clps711x-gpio"
- compatible: Should be "cirrus,ep7209-gpio"
- reg: Physical base GPIO controller registers location and length.
  There should be two registers, first is DATA register, the second
  is DIRECTION.
@@ -21,7 +21,7 @@ aliases {
};

porta: gpio@80000000 {
	compatible = "cirrus,clps711x-gpio";
	compatible = "cirrus,ep7312-gpio","cirrus,ep7209-gpio";
	reg = <0x80000000 0x1>, <0x80000040 0x1>;
	gpio-controller;
	#gpio-cells = <2>;
+25 −0
Original line number Diff line number Diff line
GPIO driver for MAX77620 Power management IC from Maxim Semiconductor.

Device has 8 GPIO pins which can be configured as GPIO as well as the
special IO functions.

Required properties:
-------------------
- gpio-controller : 	Marks the device node as a gpio controller.
- #gpio-cells : 	Should be two.  The first cell is the pin number and
			the second cell is used to specify the gpio polarity:
				0 = active high
				1 = active low
For more details, please refer generic GPIO DT binding document
<devicetree/bindings/gpio/gpio.txt>.

Example:
--------
#include <dt-bindings/mfd/max77620.h>
...
max77620@3c {
	compatible = "maxim,max77620";

	gpio-controller;
	#gpio-cells = <2>;
};
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ Required properties:
	maxim,max7313
	maxim,max7315
	ti,pca6107
	ti,pca9536
	ti,tca6408
	ti,tca6416
	ti,tca6424
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ Required Properties:
    - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
    - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
    - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller.
    - "renesas,gpio-r8a7792": for R8A7792 (R-Car V2H) compatible GPIO controller.
    - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
    - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
    - "renesas,gpio-r8a7795": for R8A7795 (R-Car H3) compatible GPIO controller.
Loading