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

Commit 27c7651a 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 v3.12 series:

   - A new driver for the TZ1090 PDC which is used on the metag
     architecture.

   - A new driver for the Kontron ETX or COMexpress GPIO block.  This is
     found on some ETX x86 devices.

   - A new driver for the Fintek Super-I/O chips, used on some x86
     boards.

   - Added device tree probing on a few select GPIO blocks.

   - Drop the Exynos support from the Samsung GPIO driver.

     The Samsung maintainers have moved over to use the modernized pin
     control driver to provide GPIO for the modern platforms instead.

   - The usual bunch of non-critical fixes and cleanups"

* tag 'gpio-v3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (36 commits)
  gpio: return -ENOTSUPP if debounce cannot be set
  gpio: improve error path in gpiolib
  gpio: add GPIO support for F71882FG and F71889F
  of: add vendor prefix for Microchip Technology Inc
  gpio: mcp23s08: rename the device tree property
  gpio: samsung: Drop support for Exynos SoCs
  gpio: pcf857x: Remove pdata argument to pcf857x_irq_domain_init()
  gpio: pcf857x: Sort headers alphabetically
  gpio: max7301: Reverting "Do not force SPI speed when using OF Platform"
  gpio: Fix bit masking in Kontron PLD GPIO driver
  gpio: pca953x: fix gpio input on gpio offsets >= 8
  drivers/gpio: simplify use of devm_ioremap_resource
  drivers/gpio/gpio-omap.c: convert comma to semicolon
  gpio-lynxpoint: Fix warning about unbalanced pm_runtime_enable
  gpio: Fix platform driver name in Kontron PLD GPIO driver
  gpio: adnp: Fix segfault if request_threaded_irq fails
  gpio: msm: Staticize local variable 'msm_gpio'
  gpio: gpiolib-of.c: make error message more meaningful by adding the node name and index
  gpio: use dev_get_platdata()
  gpio/mxc: add chained_irq_enter/exit() to mx2_gpio_irq_handler
  ...
parents 8b8a7df9 65d87656
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -3,10 +3,17 @@ Microchip MCP2308/MCP23S08/MCP23017/MCP23S17 driver for

Required properties:
- compatible : Should be
    - "mcp,mcp23s08" for  8 GPIO SPI version
    - "mcp,mcp23s17" for 16 GPIO SPI version
    - "mcp,mcp23008" for  8 GPIO I2C version or
    - "mcp,mcp23017" for 16 GPIO I2C version of the chip
    - "mcp,mcp23s08" (DEPRECATED) for  8 GPIO SPI version
    - "mcp,mcp23s17" (DEPRECATED) for 16 GPIO SPI version
    - "mcp,mcp23008" (DEPRECATED) for  8 GPIO I2C version or
    - "mcp,mcp23017" (DEPRECATED) for 16 GPIO I2C version of the chip

    - "microchip,mcp23s08" for  8 GPIO SPI version
    - "microchip,mcp23s17" for 16 GPIO SPI version
    - "microchip,mcp23008" for  8 GPIO I2C version or
    - "microchip,mcp23017" for 16 GPIO I2C version of the chip
    NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
    removed.
- #gpio-cells : Should be two.
  - first cell is the pin number
  - second cell is used to specify flags. Flags are currently unused.
@@ -15,10 +22,11 @@ Required properties:
        SPI uses this to specify the chipselect line which the chip is
        connected to. The driver and the SPI variant of the chip support
        multiple chips on the same chipselect. Have a look at
        mcp,spi-present-mask below.
        microchip,spi-present-mask below.

Required device specific properties (only for SPI chips):
- mcp,spi-present-mask : This is a present flag, that makes only sense for SPI
- mcp,spi-present-mask (DEPRECATED)
- microchip,spi-present-mask : This is a present flag, that makes only sense for SPI
        chips - as the name suggests. Multiple SPI chips can share the same
        SPI chipselect. Set a bit in bit0-7 in this mask to 1 if there is a
        chip connected with the corresponding spi address set. For example if
@@ -26,11 +34,13 @@ Required device specific properties (only for SPI chips):
        which is 0x08. mcp23s08 chip variant only supports bits 0-3. It is not
        possible to mix mcp23s08 and mcp23s17 on the same chipselect. Set at
        least one bit to 1 for SPI chips.
    NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
    removed.
- spi-max-frequency = The maximum frequency this chip is able to handle

Example I2C:
gpiom1: gpio@20 {
        compatible = "mcp,mcp23017";
        compatible = "microchip,mcp23017";
        gpio-controller;
        #gpio-cells = <2>;
        reg = <0x20>;
@@ -38,7 +48,7 @@ gpiom1: gpio@20 {

Example SPI:
gpiom1: gpio@0 {
        compatible = "mcp,mcp23s17";
        compatible = "microchip,mcp23s17";
        gpio-controller;
        #gpio-cells = <2>;
        spi-present-mask = <0x01>;
+27 −0
Original line number Diff line number Diff line
Palmas GPIO controller bindings

Required properties:
- compatible:
  - "ti,palams-gpio" for palma series of the GPIO controller
  - "ti,tps80036-gpio" for Palma series device TPS80036.
  - "ti,tps65913-gpio" for palma series device TPS65913.
  - "ti,tps65914-gpio" for palma series device TPS65914.
- #gpio-cells : Should be two.
  - first cell is the gpio pin number
  - second cell is used to specify the gpio polarity:
      0 = active high
      1 = active low
- gpio-controller : Marks the device node as a GPIO controller.

Note: This gpio node will be sub node of palmas node.

Example:
	palmas: tps65913@58 {
		:::::::::::
		palmas_gpio: palmas_gpio {
			compatible = "ti,palmas-gpio";
			gpio-controller;
			#gpio-cells = <2>;
		};
		:::::::::::
	};
+45 −0
Original line number Diff line number Diff line
ImgTec TZ1090 PDC GPIO Controller

Required properties:
- compatible: Compatible property value should be "img,tz1090-pdc-gpio".

- reg: Physical base address of the controller and length of memory mapped
  region. This starts at and cover the SOC_GPIO_CONTROL registers.

- gpio-controller: Specifies that the node is a gpio controller.

- #gpio-cells: Should be 2. The syntax of the gpio specifier used by client
  nodes should have the following values.
     <[phandle of the gpio controller node]
      [PDC gpio number]
      [gpio flags]>

  Values for gpio specifier:
  - GPIO number: a value in the range 0 to 6.
  - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>.
    Only the following flags are supported:
      GPIO_ACTIVE_HIGH
      GPIO_ACTIVE_LOW

Optional properties:
- gpio-ranges: Mapping to pin controller pins (as described in
  Documentation/devicetree/bindings/gpio/gpio.txt)

- interrupts: Individual syswake interrupts (other GPIOs cannot interrupt)


Example:

	pdc_gpios: gpio-controller@02006500 {
		gpio-controller;
		#gpio-cells = <2>;

		compatible = "img,tz1090-pdc-gpio";
		reg = <0x02006500 0x100>;

		interrupt-parent = <&pdc>;
		interrupts =	<8  IRQ_TYPE_NONE>,	/* Syswake 0 */
				<9  IRQ_TYPE_NONE>,	/* Syswake 1 */
				<10 IRQ_TYPE_NONE>;	/* Syswake 2 */
		gpio-ranges = <&pdc_pinctrl 0 0 7>;
	};
+88 −0
Original line number Diff line number Diff line
ImgTec TZ1090 GPIO Controller

Required properties:
- compatible: Compatible property value should be "img,tz1090-gpio".

- reg: Physical base address of the controller and length of memory mapped
  region.

- #address-cells: Should be 1 (for bank subnodes)

- #size-cells: Should be 0 (for bank subnodes)

- Each bank of GPIOs should have a subnode to represent it.

  Bank subnode required properties:
  - reg: Index of bank in the range 0 to 2.

  - gpio-controller: Specifies that the node is a gpio controller.

  - #gpio-cells: Should be 2. The syntax of the gpio specifier used by client
    nodes should have the following values.
       <[phandle of the gpio controller node]
        [gpio number within the gpio bank]
        [gpio flags]>

    Values for gpio specifier:
    - GPIO number: a value in the range 0 to 29.
    - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>.
      Only the following flags are supported:
        GPIO_ACTIVE_HIGH
        GPIO_ACTIVE_LOW

  Bank subnode optional properties:
  - gpio-ranges: Mapping to pin controller pins (as described in
    Documentation/devicetree/bindings/gpio/gpio.txt)

  - interrupts: Interrupt for the entire bank

  - interrupt-controller: Specifies that the node is an interrupt controller

  - #interrupt-cells: Should be 2. The syntax of the interrupt specifier used by
    client nodes should have the following values.
       <[phandle of the interurupt controller]
        [gpio number within the gpio bank]
        [irq flags]>

    Values for irq specifier:
    - GPIO number: a value in the range 0 to 29
    - IRQ flags: value to describe edge and level triggering, as defined in
      <dt-bindings/interrupt-controller/irq.h>. Only the following flags are
      supported:
        IRQ_TYPE_EDGE_RISING
        IRQ_TYPE_EDGE_FALLING
        IRQ_TYPE_EDGE_BOTH
        IRQ_TYPE_LEVEL_HIGH
        IRQ_TYPE_LEVEL_LOW



Example:

	gpios: gpio-controller@02005800 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "img,tz1090-gpio";
		reg = <0x02005800 0x90>;

		/* bank 0 with an interrupt */
		gpios0: bank@0 {
			#gpio-cells = <2>;
			#interrupt-cells = <2>;
			reg = <0>;
			interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
			gpio-controller;
			gpio-ranges = <&pinctrl 0 0 30>;
			interrupt-controller;
		};

		/* bank 2 without interrupt */
		gpios2: bank@2 {
			#gpio-cells = <2>;
			reg = <2>;
			gpio-controller;
			gpio-ranges = <&pinctrl 0 60 30>;
		};
	};

+4 −3
Original line number Diff line number Diff line
@@ -10,8 +10,9 @@ Required properties:
  There're three gpio interrupts in arch-pxa, and they're gpio0,
  gpio1 and gpio_mux. There're only one gpio interrupt in arch-mmp,
  gpio_mux.
- interrupt-name : Should be the name of irq resource. Each interrupt
  binds its interrupt-name.
- interrupt-names : Should be the names of irq resources. Each interrupt
  uses its own interrupt name, so there should be as many interrupt names
  as referenced interrups.
- interrupt-controller : Identifies the node as an interrupt controller.
- #interrupt-cells: Specifies the number of cells needed to encode an
  interrupt source.
@@ -24,7 +25,7 @@ Example:
		compatible = "marvell,mmp-gpio";
		reg = <0xd4019000 0x1000>;
		interrupts = <49>;
		interrupt-name = "gpio_mux";
		interrupt-names = "gpio_mux";
		gpio-controller;
		#gpio-cells = <1>;
		interrupt-controller;
Loading