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

Commit b0885d01 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull GPIO updates from Grant Likely:
 "GPIO follow up patch and type change for v3.5 merge window

  Primarily device driver additions, features and bug fixes.  Not much
  touching gpio common subsystem support.  Should not be scary."

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
  gpio: Provide the STMPE GPIO driver with its own IRQ Domain
  gpio: add TS-5500 DIO blocks support
  gpio: pcf857x: use client->irq for gpio_to_irq()
  gpio: stmpe: Add DT support for stmpe gpio
  gpio: pl061 depends on ARM
  gpio/pl061: remove old comment
  gpio: SPEAr: add spi chipselect control driver
  gpio: gpio-max710x: Support device tree probing
  gpio: twl4030: Use only TWL4030_MODULE_LED for LED configuration
  gpio: tegra: read output value when gpio is set in direction_out
  gpio: pca953x: Add compatible strings to gpio-pca953x driver
  gpio: pca953x: Register an IRQ domain
  gpio: mvebu: Set free callback for gpio_chip
  gpio: tegra: Drop exporting static functions
  gpio: tegra: Staticize non-exported symbols
  gpio: tegra: fix suspend/resume apis
  gpio-pch: Set parent dev for gpio chip
  gpio: em: Fix build errors
  GPIO: clps711x: use platform_device_unregister in gpio_clps711x_init()
  gpio/tc3589x: convert to use the simple irqdomain
  ...
parents bad73c5a fc13d5a5
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
STMPE gpio
----------

Required properties:
 - compatible: "st,stmpe-gpio"

Optional properties:
 - st,norequest-mask: bitmask specifying which GPIOs should _not_ be requestable
   due to different usage (e.g. touch, keypad)

Node name must be stmpe_gpio and should be child node of stmpe node to which it
belongs.

Example:
	stmpe_gpio {
		compatible = "st,stmpe-gpio";
		st,norequest-mask = <0x20>;	//gpio 5 can't be used
	};
+50 −0
Original line number Diff line number Diff line
=== ST Microelectronics SPEAr SPI CS Driver ===

SPEAr platform provides a provision to control chipselects of ARM PL022 Prime
Cell spi controller through its system registers, which otherwise remains under
PL022 control. If chipselect remain under PL022 control then they would be
released as soon as transfer is over and TxFIFO becomes empty. This is not
desired by some of the device protocols above spi which expect (multiple)
transfers without releasing their chipselects.

Chipselects can be controlled by software by turning them as GPIOs. SPEAr
provides another interface through system registers through which software can
directly control each PL022 chipselect. Hence, it is natural for SPEAr to export
the control of this interface as gpio.

Required properties:

  * compatible: should be defined as "st,spear-spics-gpio"
  * reg: mentioning address range of spics controller
  * st-spics,peripcfg-reg: peripheral configuration register offset
  * st-spics,sw-enable-bit: bit offset to enable sw control
  * st-spics,cs-value-bit: bit offset to drive chipselect low or high
  * st-spics,cs-enable-mask: chip select number bit mask
  * st-spics,cs-enable-shift: chip select number program offset
  * gpio-controller: Marks the device node as gpio controller
  * #gpio-cells: should be 1 and will mention chip select number

All the above bit offsets are within peripcfg register.

Example:
-------
spics: spics@e0700000{
        compatible = "st,spear-spics-gpio";
        reg = <0xe0700000 0x1000>;
        st-spics,peripcfg-reg = <0x3b0>;
        st-spics,sw-enable-bit = <12>;
        st-spics,cs-value-bit = <11>;
        st-spics,cs-enable-mask = <3>;
        st-spics,cs-enable-shift = <8>;
        gpio-controller;
        #gpio-cells = <2>;
};


spi0: spi@e0100000 {
        status = "okay";
        num-cs = <3>;
        cs-gpios = <&gpio1 7 0>, <&spics 0>,
                   <&spics 1>;
	...
}
+1 −0
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@ config ARCH_CNS3XXX

config ARCH_CLPS711X
	bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
	select ARCH_REQUIRE_GPIOLIB
	select ARCH_USES_GETTIMEOFFSET
	select CLKDEV_LOOKUP
	select COMMON_CLK
+1 −1
Original line number Diff line number Diff line
@@ -548,7 +548,6 @@ static struct platform_device fsi_ak4648_device = {
/* I2C */
static struct pcf857x_platform_data pcf8575_pdata = {
	.gpio_base	= GPIO_PCF8575_BASE,
	.irq		= intcs_evt2irq(0x3260), /* IRQ19 */
};

static struct i2c_board_info i2c0_devices[] = {
@@ -570,6 +569,7 @@ static struct i2c_board_info i2c1_devices[] = {
static struct i2c_board_info i2c3_devices[] = {
	{
		I2C_BOARD_INFO("pcf8575", 0x20),
		.irq		= intcs_evt2irq(0x3260), /* IRQ19 */
		.platform_data = &pcf8575_pdata,
	},
};
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ config ARCH_SPEAR13XX
	bool "ST SPEAr13xx with Device Tree"
	select ARM_GIC
	select CPU_V7
	select GPIO_SPEAR_SPICS
	select HAVE_SMP
	select MIGHT_HAVE_CACHE_L2X0
	select PINCTRL
Loading