Merge tag 'gpio-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Sep 2017 18:49:48 +0000 (11:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Sep 2017 18:49:48 +0000 (11:49 -0700)
Pull GPIO updates from Linus Walleij:
 "This is the bulk of the GPIO changes for the v4.14 cycle.

  Not so much changes this time, phew. David Daney and Bartosz
  Golaszewski did all the really interesting work in infrastructure
  improvement across GPIO and IRQ core, hats off for them and to tglx
  and Marc Z for general help with these patch sets.

  Core changes:

   - Allow the GPIO irqchip to allocate IRQs dynamically. This is an
     important change on systems where only a restricted number of IRQs,
     lesser than the number of GPIO lines, can be utilized. Now we can
     allocate these on a first-come-first-served basis instead of
     hogging up valuable IRQ lines.

   - Serious fix-up of the kerneldoc documentation and inclusion into
     the kerneldoc builds.

   - Pulled in the IRQ simulator from the IRQ core tree and use this in
     the GPIO mockup driver for exhaustive testing of interrupt
     abilities.

  New drivers:

   - New driver for ThunderX and OCTEON-TX. This is especially
     interesting as it picks up improvements from the IRQ core that
     allow us to handle fasteoi ACKs upwards in a hierarchy when there
     are IRQ flag latches on several levels in a hierarchy. Very
     interesting work here.

   - New subdriver for Renesas R-Car r8a7745 (RZ/G1E).

  Misc:

   - Several fixes and improvements for Xilinx Zynq GPIO.

   - Support an enablement GPIO for the 74x164 GPIO.

   - Switch a bunch of chips to use devres to allocate irq descriptors.

   - A bunch of constification fixes"

* tag 'gpio-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (63 commits)
  gpio: mockup: remove unused variable gc
  gpio: pl061: constify amba_id
  Revert "gpiolib: request the gpio before querying its direction"
  gpio: twl6040: remove unneeded forward declaration
  gpio: zevio: make gpio_chip const
  gpio: add gpio_add_lookup_tables() to add several tables at once
  gpio: rcar: Add r8a7745 (RZ/G1E) support
  gpio: brcmstb: check return value of gpiochip_irqchip_add()
  MAINTAINERS: Add entry for THUNDERX GPIO Driver.
  gpio: Add gpio driver support for ThunderX and OCTEON-TX
  gpio: mockup: use irq_sim
  gpio: mxs: use devres for irq generic chip
  gpio: mxc: use devres for irq generic chip
  gpio: pch: use devres for irq generic chip
  gpio: ml-ioh: use devres for irq generic chip
  gpio: sta2x11: use devres for irq generic chip
  gpio: sta2x11: disallow unbinding the driver
  gpio: mxs: disallow unbinding the driver
  gpio: mxc: disallow unbinding the driver
  gpio: aspeed: Remove reference to clock name in debounce warning message
  ...

1  2 
MAINTAINERS
drivers/gpio/gpiolib-sysfs.c

diff --combined MAINTAINERS
@@@ -1282,15 -1282,10 +1282,15 @@@ S:   Maintaine
  
  ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
  M:    Hans Ulli Kroll <ulli.kroll@googlemail.com>
 +M:    Linus Walleij <linus.walleij@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  T:    git git://github.com/ulli-kroll/linux.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/arm/gemini.txt
 +F:    Documentation/devicetree/bindings/pinctrl/cortina,gemini-pinctrl.txt
 +F:    Documentation/devicetree/bindings/rtc/faraday,ftrtc010.txt
  F:    arch/arm/mach-gemini/
 +F:    drivers/pinctrl/pinctrl-gemini.c
  F:    drivers/rtc/rtc-ftrtc010.c
  
  ARM/CSR SIRFPRIMA2 MACHINE SUPPORT
@@@ -1575,7 -1570,7 +1575,7 @@@ M:      Chunfeng Yun <chunfeng.yun@mediatek.
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/phy/phy-mt65xx-usb3.c
 +F:    drivers/phy/mediatek/phy-mtk-tphy.c
  
  ARM/MICREL KS8695 ARCHITECTURE
  M:    Greg Ungerer <gerg@uclinux.org>
@@@ -1998,7 -1993,6 +1998,7 @@@ F:      arch/arm64/boot/dts/socionext
  F:    drivers/bus/uniphier-system-bus.c
  F:    drivers/clk/uniphier/
  F:    drivers/i2c/busses/i2c-uniphier*
 +F:    drivers/irqchip/irq-uniphier-aidet.c
  F:    drivers/pinctrl/uniphier/
  F:    drivers/reset/reset-uniphier.c
  F:    drivers/tty/serial/8250/8250_uniphier.c
@@@ -4365,12 -4359,6 +4365,12 @@@ S:    Maintaine
  F:    drivers/gpu/drm/qxl/
  F:    include/uapi/drm/qxl_drm.h
  
 +DRM DRIVER FOR PERVASIVE DISPLAYS REPAPER PANELS
 +M:    Noralf Trønnes <noralf@tronnes.org>
 +S:    Maintained
 +F:    drivers/gpu/drm/tinydrm/repaper.c
 +F:    Documentation/devicetree/bindings/display/repaper.txt
 +
  DRM DRIVER FOR RAGE 128 VIDEO CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/r128/
@@@ -4386,12 -4374,6 +4386,12 @@@ S:    Orphan / Obsolet
  F:    drivers/gpu/drm/sis/
  F:    include/uapi/drm/sis_drm.h
  
 +DRM DRIVER FOR SITRONIX ST7586 PANELS
 +M:    David Lechner <david@lechnology.com>
 +S:    Maintained
 +F:    drivers/gpu/drm/tinydrm/st7586.c
 +F:    Documentation/devicetree/bindings/display/st7586.txt
 +
  DRM DRIVER FOR TDFX VIDEO CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/tdfx/
@@@ -4640,14 -4622,6 +4640,14 @@@ F:    drivers/gpu/drm/panel
  F:    include/drm/drm_panel.h
  F:    Documentation/devicetree/bindings/display/panel/
  
 +DRM TINYDRM DRIVERS
 +M:    Noralf Trønnes <noralf@tronnes.org>
 +W:    https://github.com/notro/tinydrm/wiki/Development
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +S:    Maintained
 +F:    drivers/gpu/drm/tinydrm/
 +F:    include/drm/tinydrm/
 +
  DSBR100 USB FM RADIO DRIVER
  M:    Alexey Klimov <klimov.linux@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -5367,11 -5341,10 +5367,11 @@@ K:   fmc_d.*registe
  
  FPGA MANAGER FRAMEWORK
  M:    Alan Tull <atull@kernel.org>
 -R:    Moritz Fischer <moritz.fischer@ettus.com>
 +R:    Moritz Fischer <mdf@kernel.org>
  L:    linux-fpga@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga.git
 +Q:    http://patchwork.kernel.org/project/linux-fpga/list/
  F:    Documentation/fpga/
  F:    Documentation/devicetree/bindings/fpga/
  F:    drivers/fpga/
@@@ -6771,9 -6744,8 +6771,9 @@@ S:      Supporte
  F:    drivers/scsi/isci/
  
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
 -M:    Daniel Vetter <daniel.vetter@intel.com>
  M:    Jani Nikula <jani.nikula@linux.intel.com>
 +M:    Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
 +M:    Rodrigo Vivi <rodrigo.vivi@intel.com>
  L:    intel-gfx@lists.freedesktop.org
  W:    https://01.org/linuxgraphics/
  B:    https://01.org/linuxgraphics/documentation/how-report-bugs
@@@ -7138,6 -7110,7 +7138,6 @@@ M:      Marc Zyngier <marc.zyngier@arm.com
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
 -T:    git git://git.infradead.org/users/jcooper/linux.git irqchip/core
  F:    Documentation/devicetree/bindings/interrupt-controller/
  F:    drivers/irqchip/
  
@@@ -7667,6 -7640,17 +7667,6 @@@ T:     git git://linuxtv.org/mkrufky/tuners
  S:    Maintained
  F:    drivers/media/dvb-frontends/lgdt3305.*
  
 -LGUEST
 -M:    Rusty Russell <rusty@rustcorp.com.au>
 -L:    lguest@lists.ozlabs.org
 -W:    http://lguest.ozlabs.org/
 -S:    Odd Fixes
 -F:    arch/x86/include/asm/lguest*.h
 -F:    arch/x86/lguest/
 -F:    drivers/lguest/
 -F:    include/linux/lguest*.h
 -F:    tools/lguest/
 -
  LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
  M:    Viresh Kumar <vireshk@kernel.org>
  L:    linux-ide@vger.kernel.org
@@@ -8481,14 -8465,6 +8481,14 @@@ M:    Sean Wang <sean.wang@mediatek.com
  S:    Maintained
  F:    drivers/char/hw_random/mtk-rng.c
  
 +MEDIATEK USB3 DRD IP DRIVER
 +M:    Chunfeng Yun <chunfeng.yun@mediatek.com>
 +L:    linux-usb@vger.kernel.org (moderated for non-subscribers)
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/usb/mtu3/
 +
  MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
  M:    Peter Senna Tschudin <peter.senna@collabora.com>
  M:    Martin Donnelly <martin.donnelly@ge.com>
@@@ -8653,7 -8629,7 +8653,7 @@@ M:      Mathieu Desnoyers <mathieu.desnoyers
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
 -F:    kernel/membarrier.c
 +F:    kernel/sched/membarrier.c
  F:    include/uapi/linux/membarrier.h
  
  MEMORY MANAGEMENT
@@@ -9490,7 -9466,6 +9490,7 @@@ M:      Srinivas Kandagatla <srinivas.kandag
  S:    Maintained
  F:    drivers/nvmem/
  F:    Documentation/devicetree/bindings/nvmem/
 +F:    Documentation/ABI/stable/sysfs-bus-nvmem
  F:    include/linux/nvmem-consumer.h
  F:    include/linux/nvmem-provider.h
  
@@@ -11136,7 -11111,7 +11136,7 @@@ M:   Fenghua Yu <fenghua.yu@intel.com
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  F:    arch/x86/kernel/cpu/intel_rdt*
 -F:    arch/x86/include/asm/intel_rdt*
 +F:    arch/x86/include/asm/intel_rdt_sched.h
  F:    Documentation/x86/intel_rdt*
  
  READ-COPY UPDATE (RCU)
@@@ -13018,6 -12993,11 +13018,11 @@@ M: Yehezkel Bernat <yehezkel.bernat@int
  S:    Maintained
  F:    drivers/thunderbolt/
  
+ THUNDERX GPIO DRIVER
+ M:    David Daney <david.daney@cavium.com>
+ S:    Maintained
+ F:    drivers/gpio/gpio-thunderx.c
  TI AM437X VPFE DRIVER
  M:    "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -2,7 -2,6 +2,7 @@@
  #include <linux/mutex.h>
  #include <linux/device.h>
  #include <linux/sysfs.h>
 +#include <linux/gpio.h>
  #include <linux/gpio/consumer.h>
  #include <linux/gpio/driver.h>
  #include <linux/interrupt.h>
@@@ -433,11 -432,6 +433,11 @@@ static struct attribute *gpiochip_attrs
  };
  ATTRIBUTE_GROUPS(gpiochip);
  
 +static struct gpio_desc *gpio_to_valid_desc(int gpio)
 +{
 +      return gpio_is_valid(gpio) ? gpio_to_desc(gpio) : NULL;
 +}
 +
  /*
   * /sys/class/gpio/export ... write-only
   *    integer N ... number of GPIO to export (full access)
@@@ -456,7 -450,7 +456,7 @@@ static ssize_t export_store(struct clas
        if (status < 0)
                goto done;
  
 -      desc = gpio_to_desc(gpio);
 +      desc = gpio_to_valid_desc(gpio);
        /* reject invalid GPIOs */
        if (!desc) {
                pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
@@@ -499,7 -493,7 +499,7 @@@ static ssize_t unexport_store(struct cl
        if (status < 0)
                goto done;
  
 -      desc = gpio_to_desc(gpio);
 +      desc = gpio_to_valid_desc(gpio);
        /* reject bogus commands (gpio_unexport ignores them) */
        if (!desc) {
                pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
@@@ -540,8 -534,8 +540,8 @@@ static struct class gpio_class = 
  
  /**
   * gpiod_export - export a GPIO through sysfs
-  * @gpio: gpio to make available, already requested
-  * @direction_may_change: true if userspace may change gpio direction
+  * @desc: GPIO to make available, already requested
+  * @direction_may_change: true if userspace may change GPIO direction
   * Context: arch_initcall or later
   *
   * When drivers want to make a GPIO accessible to userspace after they
@@@ -649,7 -643,7 +649,7 @@@ static int match_export(struct device *
   * gpiod_export_link - create a sysfs link to an exported GPIO node
   * @dev: device under which to create symlink
   * @name: name of the symlink
-  * @gpio: gpio to create symlink to, already exported
+  * @desc: GPIO to create symlink to, already exported
   *
   * Set up a symlink from /sys/.../dev/name to /sys/class/gpio/gpioN
   * node. Caller is responsible for unlinking.
@@@ -680,7 -674,7 +680,7 @@@ EXPORT_SYMBOL_GPL(gpiod_export_link)
  
  /**
   * gpiod_unexport - reverse effect of gpiod_export()
-  * @gpio: gpio to make unavailable
+  * @desc: GPIO to make unavailable
   *
   * This is implicit on gpiod_free().
   */