linux_old1/drivers/gpio
Linus Torvalds 58cf279aca GPIO bulk updates for the v4.5 kernel cycle:
Infrastructural changes:
 
 - In struct gpio_chip, rename the .dev node to .parent to better reflect
   the fact that this is not the GPIO struct device abstraction. We will
   add that soon so this would be totallt confusing.
 
 - It was noted that the driver .get_value() callbacks was
   sometimes reporting negative -ERR values to the gpiolib core, expecting
   them to be propagated to consumer gpiod_get_value() and gpio_get_value()
   calls. This was not happening, so as there was a mess of drivers
   returning negative errors and some returning "anything else than zero"
   to indicate that a line was active. As some would have bit 31 set to
   indicate "line active" it clashed with negative error codes. This is
   fixed by the largeish series clamping values in all drivers with
   !!value to [0,1] and then augmenting the code to propagate error codes
   to consumers. (Includes some ACKed patches in other subsystems.)
 
 - Add a void *data pointer to struct gpio_chip. The container_of() design
   pattern is indeed very nice, but we want to reform the struct gpio_chip
   to be a non-volative, stateless business, and keep states internal to
   the gpiolib to be able to hold on to the state when adding a proper
   userspace ABI (character device) further down the road. To achieve this,
   drivers need a handle at the internal state that is not dependent on
   their struct gpio_chip() so we add gpiochip_add_data() and
   gpiochip_get_data() following the pattern of many other subsystems.
   All the "use gpiochip data pointer" patches transforms drivers to this
   scheme.
 
 - The Generic GPIO chip header has been merged into the general
   <linux/gpio/driver.h> header, and the custom header for that removed.
   Instead of having a separate mm_gpio_chip struct for these generic
   drivers, merge that into struct gpio_chip, simplifying the code and
   removing the need for separate and confusing includes.
 
 Misc improvements:
 
 - Stabilize the way GPIOs are looked up from the ACPI legacy
   specification.
 
 - Incremental driver features for PXA, PCA953X, Lantiq (patches from the
   OpenWRT community), RCAR, Zynq, PL061, 104-idi-48
 
 New drivers:
 
 - Add a GPIO chip to the ALSA SoC AC97 driver.
 
 - Add a new Broadcom NSP SoC driver (this lands in the pinctrl dir, but
   the branch is merged here too to account for infrastructural changes).
 
 - The sx150x driver now supports the sx1502.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWmsZhAAoJEEEQszewGV1ztq0QAJ1KbNOpmf/s3INkOH4r771Z
 WIrNEsmwwLIAryo8gKNOM0H1zCwhRUV7hIE5jYWgD6JvjuAN6vobMlZAq21j6YpB
 pKgqnI5DuoND450xjb8wSwGQ5NTYp1rFXNmwCrtyTjOle6AAW+Kp2cvVWxVr77Av
 uJinRuuBr9GOKW/yYM1Fw/6EPjkvvhVOb+LBguRyVvq0s5Peyw7ZVeY1tjgPHJLn
 oSZ9dmPUjHEn91oZQbtfro3plOObcxdgJ8vo//pgEmyhMeR8XjXES+aUfErxqWOU
 PimrZuMMy4cxnsqWwh3Dyxo7KSWfJKfSPRwnGwc/HgbHZEoWxOZI1ezRtGKrRQtj
 vubxp5dUBA5z66TMsOCeJtzKVSofkvgX2Wr/Y9jKp5oy9cHdAZv9+jEHV1pr6asz
 Tas97MmmO77XuRI/GPDqVHx8dfa15OIz9s92+Gu64KxNzVxTo4+NdoPSNxkbCILO
 FKn7EmU3D0OjmN2NJ9GAURoFaj3BBUgNhaxacG9j2bieyh+euuUHRtyh2k8zXR9y
 8OnY1UOrTUYF8YIq9pXZxMQRD/lqwCNHvEjtI6BqMcNx4MptfTL+FKYUkn/SgCYk
 QTNV6Ui+ety5D5aEpp5q0ItGsrDJ2LYSItsS+cOtMy2ieOxbQav9NWwu7eI3l5ly
 gwYTZjG9p9joPXLW0E3g
 =63rR
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO updates from Linus Walleij:
 "Here is the bulk of GPIO changes for v4.5.

  Notably there are big refactorings mostly by myself, aimed at getting
  the gpio_chip into a shape that makes me believe I can proceed to
  preserve state for a proper userspace ABI (character device) that has
  already been proposed once, but resulted in the feedback that I need
  to go back and restructure stuff.  So I've been restructuring stuff.
  On the way I ran into brokenness (return code from the get_value()
  callback) and had to fix it.  Also, refactored generic GPIO to be
  simpler.

  Some of that is still waiting to trickle down from the subsystems all
  over the kernel that provide random gpio_chips, I've touched every
  single GPIO driver in the kernel now, oh man I didn't know I was
  responsible for so much...

  Apart from that we're churning along as usual.

  I took some effort to test and retest so it should merge nicely and we
  shook out a couple of bugs in -next.

  Infrastructural changes:

   - In struct gpio_chip, rename the .dev node to .parent to better
     reflect the fact that this is not the GPIO struct device
     abstraction.  We will add that soon so this would be totallt
     confusing.

   - It was noted that the driver .get_value() callbacks was sometimes
     reporting negative -ERR values to the gpiolib core, expecting them
     to be propagated to consumer gpiod_get_value() and gpio_get_value()
     calls.  This was not happening, so as there was a mess of drivers
     returning negative errors and some returning "anything else than
     zero" to indicate that a line was active.  As some would have bit
     31 set to indicate "line active" it clashed with negative error
     codes.  This is fixed by the largeish series clamping values in all
     drivers with !!value to [0,1] and then augmenting the code to
     propagate error codes to consumers.  (Includes some ACKed patches
     in other subsystems.)

   - Add a void *data pointer to struct gpio_chip.  The container_of()
     design pattern is indeed very nice, but we want to reform the
     struct gpio_chip to be a non-volative, stateless business, and keep
     states internal to the gpiolib to be able to hold on to the state
     when adding a proper userspace ABI (character device) further down
     the road.  To achieve this, drivers need a handle at the internal
     state that is not dependent on their struct gpio_chip() so we add
     gpiochip_add_data() and gpiochip_get_data() following the pattern
     of many other subsystems.  All the "use gpiochip data pointer"
     patches transforms drivers to this scheme.

   - The Generic GPIO chip header has been merged into the general
     <linux/gpio/driver.h> header, and the custom header for that
     removed.  Instead of having a separate mm_gpio_chip struct for
     these generic drivers, merge that into struct gpio_chip,
     simplifying the code and removing the need for separate and
     confusing includes.

  Misc improvements:

   - Stabilize the way GPIOs are looked up from the ACPI legacy
     specification.

   - Incremental driver features for PXA, PCA953X, Lantiq (patches from
     the OpenWRT community), RCAR, Zynq, PL061, 104-idi-48

  New drivers:

   - Add a GPIO chip to the ALSA SoC AC97 driver.

   - Add a new Broadcom NSP SoC driver (this lands in the pinctrl dir,
     but the branch is merged here too to account for infrastructural
     changes).

   - The sx150x driver now supports the sx1502"

* tag 'gpio-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (220 commits)
  gpio: generic: make bgpio_pdata always visible
  gpiolib: fix chip order in gpio list
  gpio: mpc8xxx: Do not use gpiochip_get_data() in mpc8xxx_gpio_save_regs()
  gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()
  gpio: brcmstb: Allow building driver for BMIPS_GENERIC
  gpio: brcmstb: Set endian flags for big-endian MIPS
  gpio: moxart: fix build regression
  gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs()
  leds: pca9532: use gpiochip data pointer
  leds: tca6507: use gpiochip data pointer
  hid: cp2112: use gpiochip data pointer
  bcma: gpio: use gpiochip data pointer
  avr32: gpio: use gpiochip data pointer
  video: fbdev: via: use gpiochip data pointer
  gpio: pch: Optimize pch_gpio_get()
  Revert "pinctrl: lantiq: Implement gpio_chip.to_irq"
  pinctrl: nsp-gpio: use gpiochip data pointer
  pinctrl: vt8500-wmt: use gpiochip data pointer
  pinctrl: exynos5440: use gpiochip data pointer
  pinctrl: at91-pio4: use gpiochip data pointer
  ...
2016-01-17 12:32:01 -08:00
..
Kconfig gpio: brcmstb: Allow building driver for BMIPS_GENERIC 2016-01-07 16:26:53 +01:00
Makefile gpio: Add GPIO support for the ACCES 104-IDI-48 2015-12-01 09:56:36 +01:00
devres.c gpio: make flags mandatory for gpiod_get functions 2015-07-06 10:39:24 +02:00
gpio-74x164.c gpio: 74x164: use gpiochip data pointer 2016-01-05 11:21:01 +01:00
gpio-74xx-mmio.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-104-idi-48.c gpio: 104-idi-48: use gpiochip data pointer 2016-01-05 11:21:01 +01:00
gpio-104-idio-16.c gpio: 104-idio-16: use gpiochip data pointer 2016-01-05 11:21:01 +01:00
gpio-adnp.c gpio: adnp: use gpiochip data pointer 2016-01-05 11:21:01 +01:00
gpio-adp5520.c gpio: adp5520: use gpiochip data pointer 2016-01-05 11:21:02 +01:00
gpio-adp5588.c gpio: adp5588: use gpiochip data pointer 2016-01-05 11:21:02 +01:00
gpio-altera.c gpio: altera: use gpiochip data pointer 2016-01-05 11:21:02 +01:00
gpio-amd8111.c gpio: amd8111: use gpiochip data pointer 2016-01-05 11:21:02 +01:00
gpio-amdpt.c gpio: amdpt: use gpiochip data pointer 2016-01-05 11:21:02 +01:00
gpio-arizona.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
gpio-ath79.c gpio: ath79: use gpiochip data pointer 2016-01-05 11:21:03 +01:00
gpio-bcm-kona.c gpio: bcm-kona: use gpiochip data pointer 2016-01-05 11:21:03 +01:00
gpio-brcmstb.c gpio: brcmstb: Set endian flags for big-endian MIPS 2016-01-07 16:25:09 +01:00
gpio-bt8xx.c gpio: bt8xx: use gpiochip data pointer 2016-01-05 11:21:03 +01:00
gpio-clps711x.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-crystalcove.c gpio: crystalcove: use gpiochip data pointer 2016-01-05 11:21:04 +01:00
gpio-cs5535.c gpio: cs5535: use gpiochip data pointer 2016-01-05 11:21:04 +01:00
gpio-da9052.c gpio: da9052: use gpiochip data pointer 2016-01-05 11:21:04 +01:00
gpio-da9055.c gpio: da9055: use gpiochip data pointer 2016-01-05 11:21:04 +01:00
gpio-davinci.c gpio: davinci: use gpiochip data pointer 2016-01-05 11:21:04 +01:00
gpio-dln2.c gpio: dln2: use gpiochip data pointer 2016-01-05 11:21:05 +01:00
gpio-dwapb.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-em.c gpio: em: use gpiochip data pointer 2016-01-05 11:21:05 +01:00
gpio-ep93xx.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-etraxfs.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-f7188x.c gpio: f7188: use gpiochip data pointer 2016-01-05 11:21:05 +01:00
gpio-ge.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-generic.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-grgpio.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-ich.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-intel-mid.c gpio: intel-mid: use gpiochip data pointer 2016-01-05 11:21:05 +01:00
gpio-iop.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-it87.c gpio: it87: use gpiochip data pointer 2016-01-05 11:21:06 +01:00
gpio-janz-ttl.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-kempld.c gpio: kempld: use gpiochip data pointer 2016-01-05 11:21:06 +01:00
gpio-ks8695.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-loongson.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-lp3943.c gpio: lp3943: use gpiochip data pointer 2016-01-05 11:21:06 +01:00
gpio-lpc18xx.c gpio: lpc18xx: use gpiochip data pointer 2016-01-05 11:21:06 +01:00
gpio-lpc32xx.c gpio: lpc32xx: use gpiochip data pointer 2016-01-05 11:21:06 +01:00
gpio-lynxpoint.c gpio: lynxpoint: use gpiochip data pointer 2016-01-05 11:21:07 +01:00
gpio-max730x.c gpio: max730x: use gpiochip data pointer 2016-01-05 11:21:07 +01:00
gpio-max732x.c gpio: max732x: use gpiochip data pointer 2016-01-05 11:21:07 +01:00
gpio-max7300.c gpio: Drop owner assignment from i2c_driver 2015-11-30 09:31:00 +01:00
gpio-max7301.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
gpio-mb86s7x.c gpio: mb86s7x: use gpiochip data pointer 2016-01-05 11:21:07 +01:00
gpio-mc9s08dz60.c gpio: mc9s08dz60: use gpiochip data pointer 2016-01-05 11:21:08 +01:00
gpio-mc33880.c gpio: mc33880: use gpiochip data pointer 2016-01-05 11:21:07 +01:00
gpio-mcp23s08.c gpio: mcp: use gpiochip data pointer 2016-01-05 11:21:08 +01:00
gpio-ml-ioh.c gpio: ml-ioh: use gpiochip data pointer 2016-01-05 11:21:08 +01:00
gpio-mm-lantiq.c gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs() 2016-01-13 10:21:06 +01:00
gpio-moxart.c gpio: moxart: fix build regression 2016-01-07 16:16:38 +01:00
gpio-mpc8xxx.c gpio: mpc8xxx: Do not use gpiochip_get_data() in mpc8xxx_gpio_save_regs() 2016-01-13 10:22:23 +01:00
gpio-mpc5200.c gpio: mpc5200: use gpiochip data pointer 2016-01-05 11:21:08 +01:00
gpio-msic.c gpio: msic: use gpiochip data pointer 2016-01-05 11:21:09 +01:00
gpio-mvebu.c gpio: mvebu: use gpiochip data pointer 2016-01-05 11:21:09 +01:00
gpio-mxc.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-mxs.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-octeon.c gpio: octeon: use gpiochip data pointer 2016-01-05 11:21:10 +01:00
gpio-omap.c gpio: omap: use gpiochip data pointer 2016-01-05 11:21:10 +01:00
gpio-palmas.c gpio: palmas: use gpiochip data pointer 2016-01-05 11:21:10 +01:00
gpio-pca953x.c gpio: pca953x: use gpiochip data pointer 2016-01-05 11:21:11 +01:00
gpio-pcf857x.c gpio: pcf857x: use gpiochip data pointer 2016-01-05 11:21:11 +01:00
gpio-pch.c gpio: pch: Optimize pch_gpio_get() 2016-01-05 15:46:34 +01:00
gpio-pl061.c gpio: pl061: use gpiochip data pointer 2016-01-05 11:21:11 +01:00
gpio-pxa.c gpio: pxa: use gpiochip data pointer 2016-01-05 11:21:12 +01:00
gpio-rc5t583.c gpio: rc5t583: use gpiochip data pointer 2016-01-05 11:21:12 +01:00
gpio-rcar.c gpio: rcar: use gpiochip data pointer 2016-01-05 11:21:12 +01:00
gpio-rdc321x.c gpio: rdc321x: use gpiochip data pointer 2016-01-05 11:21:12 +01:00
gpio-sa1100.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-samsung.c gpio: samsung: use gpiochip data pointer 2016-01-05 11:21:12 +01:00
gpio-sch.c gpio: sch: use gpiochip data pointer 2016-01-05 11:21:13 +01:00
gpio-sch311x.c gpio: sch311x: use gpiochip data pointer 2016-01-05 11:21:13 +01:00
gpio-sodaville.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-spear-spics.c gpio: spear-spics: use gpiochip data pointer 2016-01-05 11:21:13 +01:00
gpio-sta2x11.c gpio: sta2x11: use gpiochip data pointer 2016-01-05 11:21:13 +01:00
gpio-stmpe.c gpio: stmpe: use gpiochip data pointer 2016-01-05 11:21:14 +01:00
gpio-stp-xway.c gpio: stp-xway: use gpiochip data pointer 2016-01-05 11:21:14 +01:00
gpio-sx150x.c gpio: sx150x: use gpiochip data pointer 2016-01-05 11:21:14 +01:00
gpio-syscon.c gpio: syscon: use gpiochip data pointer 2016-01-05 11:21:14 +01:00
gpio-tb10x.c gpio: tb10x: use gpiochip data pointer 2016-01-05 11:21:15 +01:00
gpio-tc3589x.c gpio: tc3589x: use gpiochip data pointer 2016-01-05 11:21:15 +01:00
gpio-tegra.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-timberdale.c gpio: timberdale: use gpiochip data pointer 2016-01-05 11:21:15 +01:00
gpio-tps6586x.c gpio: tps6586x: use gpiochip data pointer 2016-01-05 11:21:15 +01:00
gpio-tps65910.c gpio: tps65910: use gpiochip data pointer 2016-01-05 11:21:15 +01:00
gpio-tps65912.c gpio: tps65912: use gpiochip data pointer 2016-01-05 11:21:16 +01:00
gpio-ts5500.c gpio: ts5500: use gpiochip data pointer 2016-01-05 11:21:16 +01:00
gpio-twl4030.c gpio: twl4030: use gpiochip data pointer 2016-01-05 11:21:16 +01:00
gpio-twl6040.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-tz1090-pdc.c gpio: tz1090-pdc: use gpiochip data pointer 2016-01-05 11:21:16 +01:00
gpio-tz1090.c gpio: tz1090: use gpiochip data pointer 2016-01-05 11:21:16 +01:00
gpio-ucb1400.c gpio: ucb1400: use gpiochip data pointer 2016-01-05 11:21:17 +01:00
gpio-vf610.c gpio: vf610: use gpiochip data pointer 2016-01-05 11:21:17 +01:00
gpio-viperboard.c gpio: viperboard: use gpiochip data pointer 2016-01-05 11:21:17 +01:00
gpio-vr41xx.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-vx855.c gpio: vx855: use gpiochip data pointer 2016-01-05 11:21:18 +01:00
gpio-wm831x.c gpio: wm831x: use gpiochip data pointer 2016-01-05 11:21:18 +01:00
gpio-wm8350.c gpio: wm8350: use gpiochip data pointer 2016-01-05 11:21:18 +01:00
gpio-wm8994.c gpio: wm8994: use gpiochip data pointer 2016-01-05 11:21:18 +01:00
gpio-xgene-sb.c gpio: generic: factor into gpio_chip struct 2016-01-05 11:21:00 +01:00
gpio-xgene.c gpio: xgene: use gpiochip data pointer 2016-01-05 11:21:19 +01:00
gpio-xilinx.c gpio: xilinx: Do not use gpiochip_get_data() in xgpio_save_regs() 2016-01-07 10:06:56 +01:00
gpio-xlp.c gpio: xlp: use gpiochip data pointer 2016-01-05 11:21:19 +01:00
gpio-xtensa.c gpio: convert remaining users to gpiochip_add_data() 2016-01-05 11:21:20 +01:00
gpio-zevio.c gpio: zevio: use gpiochip data pointer 2016-01-05 11:21:19 +01:00
gpio-zx.c gpio: zx: use gpiochip data pointer 2016-01-05 11:21:19 +01:00
gpio-zynq.c gpio: zynq: use gpiochip data pointer 2016-01-05 11:21:20 +01:00
gpiolib-acpi.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
gpiolib-legacy.c gpiolib: Split GPIO flags parsing and GPIO configuration 2015-10-16 22:46:46 +02:00
gpiolib-of.c gpio: of: provide optional of_mm_gpiochip_add_data() function 2016-01-05 11:20:12 +01:00
gpiolib-sysfs.c gpio: change member .dev to .parent 2015-11-19 09:24:35 +01:00
gpiolib.c GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
gpiolib.h GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00