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

Commit 2bd80401 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.12 kernel cycle.

  Core changes:

   - Return NULL from gpiod_get_optional() when GPIOLIB is disabled.
     This was a much discussed change. It affects use cases where people
     write drivers that might or might not be using GPIO resources. I
     have decided that this is the lesser evil right now.

   - Make gpiod_count() behave consistently across different hardware
     descriptions.

   - Fix the syntax around open drain/open source to not infer active
     high/low semantics.

  New drivers:

   - A new single-register fixed-direction framework driver for hardware
     that have lines controlled by a single register that just work in
     one direction (out or in), including IRQ support.

   - Support the Fintek F71889A GPIO SuperIO controller.

   - Support the National NI 169445 MMIO GPIO.

   - Support for the X-Gene derivative of the DWC GPIO controller

   - Support for the Rohm BD9571MWV-M PMIC GPIO controller.

   - Refactor the Gemini GPIO driver to a generic Faraday FTGPIO driver
     and replace both the Gemini and the Moxa ART custom drivers with
     this driver.

  Driver improvements:

   - A whole slew of drivers have their spinlocks chaned to raw
     spinlocks as they provide irqchips, and thus we are progressing on
     realtime compliance.

   - Use devm_irq_alloc_descs() in a slew of drivers, getting managed
     resources.

   - Support for the embedded PWM controller inside the MVEBU driver.

   - Debounce, open source and open drain support for the Aspeed driver.

   - Misc smaller fixes like spelling and syntax and whatnot"

* tag 'gpio-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits)
  gpio: f7188x: Add a missing break
  gpio: omap: return error if requested debounce time is not possible
  gpio: Add ROHM BD9571MWV-M PMIC GPIO driver
  gpio: gpio-wcove: fix GPIO IRQ status mask
  gpio: DT bindings, move tca9554 from pcf857x to pca953x
  gpio: move tca9554 from pcf857x to pca953x
  gpio: arizona: Correct check whether the pin is an input
  gpio: Add XRA1403 DTS binding documentation
  dt-bindings: add exar to vendor prefixes list
  gpio: gpio-wcove: fix irq pending status bit width
  gpio: dwapb: use dwapb_read instead of readl_relaxed
  gpio: aspeed: Add open-source and open-drain support
  gpio: aspeed: Add debounce support
  gpio: aspeed: dt: Add optional clocks property
  gpio: aspeed: dt: Fix description alignment in bindings document
  gpio: mvebu: Add limited PWM support
  gpio: Use unsigned int for interrupt numbers
  gpio: f7188x: Add F71889A GPIO support.
  gpio: core: Decouple open drain/source flag with active low/high
  gpio: arizona: Correct handling for reading input GPIOs
  ...
parents 99a7583d b86c86aa
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
Cortina Systems Gemini GPIO Controller
Faraday Technology FTGPIO010 GPIO Controller

Required properties:

- compatible : Must be "cortina,gemini-gpio"
- compatible : Should be one of
  "cortina,gemini-gpio", "faraday,ftgpio010"
  "moxa,moxart-gpio", "faraday,ftgpio010"
  "faraday,ftgpio010"
- reg : Should contain registers location and length
- interrupts : Should contain the interrupt line for the GPIO block
- gpio-controller : marks this as a GPIO controller
@@ -14,7 +17,7 @@ Required properties:
Example:

gpio@4d000000 {
	compatible = "cortina,gemini-gpio";
	compatible = "cortina,gemini-gpio", "faraday,ftgpio010";
	reg = <0x4d000000 0x100>;
	interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
	gpio-controller;
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ Required properties:
Optional properties:

- interrupt-parent      : The parent interrupt controller, optional if inherited
- clocks                : A phandle to the HPLL clock node for debounce timings

The gpio and interrupt properties are further described in their respective
bindings documentation:
+32 −0
Original line number Diff line number Diff line
@@ -38,6 +38,24 @@ Required properties:
- #gpio-cells: Should be two. The first cell is the pin number. The
  second cell is reserved for flags, unused at the moment.

Optional properties:

In order to use the GPIO lines in PWM mode, some additional optional
properties are required. Only Armada 370 and XP support these properties.

- compatible: Must contain "marvell,armada-370-xp-gpio"

- reg: an additional register set is needed, for the GPIO Blink
  Counter on/off registers.

- reg-names: Must contain an entry "pwm" corresponding to the
  additional register range needed for PWM operation.

- #pwm-cells: Should be two. The first cell is the GPIO line number. The
  second cell is the period in nanoseconds.

- clocks: Must be a phandle to the clock for the GPIO controller.

Example:

		gpio0: gpio@d0018100 {
@@ -51,3 +69,17 @@ Example:
			#interrupt-cells = <2>;
			interrupts = <16>, <17>, <18>, <19>;
		};

		gpio1: gpio@18140 {
			compatible = "marvell,armada-370-xp-gpio";
			reg = <0x18140 0x40>, <0x181c8 0x08>;
			reg-names = "gpio", "pwm";
			ngpios = <17>;
			gpio-controller;
			#gpio-cells = <2>;
			#pwm-cells = <2>;
			interrupt-controller;
			#interrupt-cells = <2>;
			interrupts = <87>, <88>, <89>;
			clocks = <&coreclk 0>;
		};
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ Required properties:
	ti,tca6416
	ti,tca6424
	ti,tca9539
	ti,tca9554
	onsemi,pca9654
	exar,xra1202

+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ Required Properties:
    - "nxp,pcf8574": For the NXP PCF8574
    - "nxp,pcf8574a": For the NXP PCF8574A
    - "nxp,pcf8575": For the NXP PCF8575
    - "ti,tca9554": For the TI TCA9554

  - reg: I2C slave address.

Loading