Skip to content

Commit

Permalink
Merge tag 'gpio-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/linusw/linux-gpio

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
  ...
  • Loading branch information
torvalds committed Jul 27, 2016
2 parents 9c1958f + 224f9e6 commit 1cd04d2
Show file tree
Hide file tree
Showing 66 changed files with 2,207 additions and 230 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* 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:
Expand All @@ -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>;
};
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/gpio/gpio-clps711x.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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.
Expand All @@ -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>;
Expand Down
25 changes: 25 additions & 0 deletions Documentation/devicetree/bindings/gpio/gpio-max77620.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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 change: 1 addition & 0 deletions Documentation/devicetree/bindings/gpio/gpio-pca953x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Required properties:
maxim,max7313
maxim,max7315
ti,pca6107
ti,pca9536
ti,tca6408
ti,tca6416
ti,tca6424
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 7 additions & 6 deletions Documentation/gpio/drivers-on-gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ hardware descriptions such as device tree or ACPI:
external connector status, such as a headset line for an audio driver or an
HDMI connector. It will provide a better userspace sysfs interface than GPIO.

- restart-gpio: drivers/power/gpio-restart.c is used to restart/reboot the
system by pulling a GPIO line and will register a restart handler so
- restart-gpio: drivers/power/reset/gpio-restart.c is used to restart/reboot
the system by pulling a GPIO line and will register a restart handler so
userspace can issue the right system call to restart the system.

- poweroff-gpio: drivers/power/gpio-poweroff.c is used to power the system down
by pulling a GPIO line and will register a pm_power_off() callback so that
userspace can issue the right system call to power down the system.
- poweroff-gpio: drivers/power/reset/gpio-poweroff.c is used to power the
system down by pulling a GPIO line and will register a pm_power_off()
callback so that userspace can issue the right system call to power down the
system.

- gpio-gate-clock: drivers/clk/clk-gpio-gate.c is used to control a gated clock
- gpio-gate-clock: drivers/clk/clk-gpio.c is used to control a gated clock
(off/on) that uses a GPIO, and integrated with the clock subsystem.

- i2c-gpio: drivers/i2c/busses/i2c-gpio.c is used to drive an I2C bus
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6060,6 +6060,12 @@ L: [email protected]
S: Supported
F: drivers/infiniband/hw/i40iw/

INTEL MERRIFIELD GPIO DRIVER
M: Andy Shevchenko <[email protected]>
L: [email protected]
S: Maintained
F: drivers/gpio/gpio-merrifield.c

INTEL-MID GPIO DRIVER
M: David Cohen <[email protected]>
L: [email protected]
Expand Down
3 changes: 1 addition & 2 deletions arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ config HEXAGON
# select HAVE_REGS_AND_STACK_ACCESS_API
# select HAVE_HW_BREAKPOINT if PERF_EVENTS
# select ARCH_HAS_CPU_IDLE_WAIT
# select ARCH_WANT_OPTIONAL_GPIOLIB
# select ARCH_REQUIRE_GPIOLIB
# select GPIOLIB
# select HAVE_CLK
# select GENERIC_PENDING_IRQ if SMP
select GENERIC_ATOMIC64
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ config IA64
select GENERIC_PENDING_IRQ if SMP
select GENERIC_IRQ_SHOW
select GENERIC_IRQ_LEGACY
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_IOMAP
select GENERIC_SMP_IDLE_THREAD
Expand Down
1 change: 0 additions & 1 deletion arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ config MICROBLAZE
select ARCH_HAS_GCOV_PROFILE_ALL
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_WANT_IPC_PARSE_VERSION
select ARCH_WANT_OPTIONAL_GPIOLIB
select BUILDTIME_EXTABLE_SORT
select CLKSRC_OF
select CLONE_BACKWARDS3
Expand Down
2 changes: 1 addition & 1 deletion arch/openrisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config OPENRISC
select IRQ_DOMAIN
select HANDLE_DOMAIN_IRQ
select HAVE_MEMBLOCK
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select HAVE_ARCH_TRACEHOOK
select GENERIC_IRQ_CHIP
select GENERIC_IRQ_PROBE
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ config PPC
select HAVE_FUNCTION_TRACER
select HAVE_FUNCTION_GRAPH_TRACER
select SYSCTL_EXCEPTION_TRACE
select ARCH_WANT_OPTIONAL_GPIOLIB
select VIRT_TO_BUS if !PPC64
select HAVE_IDE
select HAVE_IOREMAP_PROT
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/40x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ config STB03xxx
config PPC4xx_GPIO
bool "PPC4xx GPIO support"
depends on 40x
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
Enable gpiolib support for ppc40x based boards

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/44x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ config PPC44x_SIMPLE
config PPC4xx_GPIO
bool "PPC4xx GPIO support"
depends on 44x
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
Enable gpiolib support for ppc440 based boards

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/512x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config PPC_MPC512x
select IPIC
select PPC_PCI_CHOICE
select FSL_PCI if PCI
select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD
select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD

Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/platforms/83xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ endif
# used for usb & gpio
config PPC_MPC831x
bool
select ARCH_WANT_OPTIONAL_GPIOLIB

# used for math-emu
config PPC_MPC832x
Expand All @@ -125,9 +124,7 @@ config PPC_MPC832x
# used for usb & gpio
config PPC_MPC834x
bool
select ARCH_WANT_OPTIONAL_GPIOLIB

# used for usb & gpio
config PPC_MPC837x
bool
select ARCH_WANT_OPTIONAL_GPIOLIB
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/85xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ config GE_IMP3A
select DEFAULT_UIMAGE
select SWIOTLB
select MMIO_NVRAM
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select GE_FPGA
help
This option enables support for the GE Intelligent Platforms IMP3A
Expand Down Expand Up @@ -272,7 +272,7 @@ config CORENET_GENERIC
select PPC_E500MC
select PHYS_64BIT
select SWIOTLB
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
Expand Down
7 changes: 3 additions & 4 deletions arch/powerpc/platforms/86xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ menuconfig PPC_86xx
depends on 6xx
select FSL_SOC
select ALTIVEC
select ARCH_WANT_OPTIONAL_GPIOLIB
help
The Freescale E600 SoCs have 74xx cores.

Expand Down Expand Up @@ -37,7 +36,7 @@ config GEF_PPC9A
bool "GE PPC9A"
select DEFAULT_UIMAGE
select MMIO_NVRAM
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select GE_FPGA
help
This option enables support for the GE PPC9A.
Expand All @@ -46,7 +45,7 @@ config GEF_SBC310
bool "GE SBC310"
select DEFAULT_UIMAGE
select MMIO_NVRAM
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select GE_FPGA
help
This option enables support for the GE SBC310.
Expand All @@ -55,7 +54,7 @@ config GEF_SBC610
bool "GE SBC610"
select DEFAULT_UIMAGE
select MMIO_NVRAM
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select GE_FPGA
select HAS_RAPIDIO
help
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/8xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ config 8xx_COPYBACK

config 8xx_GPIO
bool "GPIO API Support"
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
Saying Y here will cause the ports on an MPC8xx processor to be used
with the GPIO API. If you say N here, the kernel needs less memory.
Expand Down
8 changes: 4 additions & 4 deletions arch/powerpc/platforms/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ config TAU_AVERAGE
config QE_GPIO
bool "QE GPIO support"
depends on QUICC_ENGINE
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
Say Y here if you're going to use hardware that connects to the
QE GPIOs.
Expand All @@ -285,7 +285,7 @@ config CPM2
depends on (FSL_SOC_BOOKE && PPC32) || 8260
select CPM
select PPC_PCI_CHOICE
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
The CPM2 (Communications Processor Module) is a coprocessor on
embedded CPUs made by Freescale. Selecting this option means that
Expand Down Expand Up @@ -324,7 +324,7 @@ config OF_RTC
config SIMPLE_GPIO
bool "Support for simple, memory-mapped GPIO controllers"
depends on PPC
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
Say Y here to support simple, memory-mapped GPIO controllers.
These are usually BCSRs used to control board's switches, LEDs,
Expand All @@ -334,7 +334,7 @@ config SIMPLE_GPIO
config MCU_MPC8349EMITX
bool "MPC8349E-mITX MCU driver"
depends on I2C=y && PPC_83xx
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
help
Say Y here to enable soft power-off functionality on the Freescale
boards with the MPC8349E-mITX-compatible MCU chips. This driver will
Expand Down
11 changes: 1 addition & 10 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ config CPU_SUBTYPE_SH7203
select CPU_HAS_FPU
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_MTU2
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL

config CPU_SUBTYPE_SH7206
Expand Down Expand Up @@ -353,7 +352,6 @@ config CPU_SUBTYPE_SH7720
select CPU_SH3
select CPU_HAS_DSP
select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_OHCI_SH if USB_OHCI_HCD
select PINCTRL
help
Expand Down Expand Up @@ -419,7 +417,6 @@ config CPU_SUBTYPE_SH7723
select ARCH_SHMOBILE
select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help
Select SH7723 if you have an SH-MobileR2 CPU.
Expand All @@ -431,7 +428,6 @@ config CPU_SUBTYPE_SH7724
select ARCH_SHMOBILE
select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help
Select SH7724 if you have an SH-MobileR2R CPU.
Expand All @@ -440,7 +436,6 @@ config CPU_SUBTYPE_SH7734
bool "Support SH7734 processor"
select CPU_SH4A
select CPU_SHX2
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help
Select SH7734 if you have a SH4A SH7734 CPU.
Expand All @@ -449,7 +444,6 @@ config CPU_SUBTYPE_SH7757
bool "Support SH7757 processor"
select CPU_SH4A
select CPU_SHX2
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL
help
Select SH7757 if you have a SH4A SH7757 CPU.
Expand All @@ -475,7 +469,6 @@ config CPU_SUBTYPE_SH7785
select CPU_SHX2
select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_NUMA
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL

config CPU_SUBTYPE_SH7786
Expand All @@ -484,7 +477,6 @@ config CPU_SUBTYPE_SH7786
select CPU_SHX3
select CPU_HAS_PTEAEX
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
select ARCH_WANT_OPTIONAL_GPIOLIB
select USB_OHCI_SH if USB_OHCI_HCD
select USB_EHCI_SH if USB_EHCI_HCD
select PINCTRL
Expand All @@ -494,7 +486,7 @@ config CPU_SUBTYPE_SHX3
select CPU_SH4A
select CPU_SHX3
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
select ARCH_REQUIRE_GPIOLIB
select GPIOLIB
select PINCTRL

# SH4AL-DSP Processor Support
Expand All @@ -513,7 +505,6 @@ config CPU_SUBTYPE_SH7722
select ARCH_SPARSEMEM_ENABLE
select SYS_SUPPORTS_NUMA
select SYS_SUPPORTS_SH_CMT
select ARCH_WANT_OPTIONAL_GPIOLIB
select PINCTRL

config CPU_SUBTYPE_SH7366
Expand Down
Loading

0 comments on commit 1cd04d2

Please sign in to comment.