diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 19:05:10 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 19:05:10 -0400 |
| commit | dff8360a4a079692e65e55fbaa6c5dc605528403 (patch) | |
| tree | 0ab8ef7595cdfb918b3fd9a8364c6ea6c9c2798f | |
| parent | 916082b073ebb7f4e064cebce0768e34cacde508 (diff) | |
| parent | 901acf5b2910434501c221a363bb3486b647b5c4 (diff) | |
Merge tag 'gpio-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO changes from Linus Walleij:
"So this is the LW GPIO patch stack for v3.7:
- refactoring from Thierry Redding at Arnd Bergmann's request to use
the seq_file iterator interface in gpiolib.
- A new driver for Avionic Design's N-bit GPIO expander.
- Two instances of mutexes replaced by spinlocks from Axel Lin to
code that is supposed to be fastpath compliant.
- IRQ demuxer and gpio_to_irq() support for pcf857x by Kuninori
Morimoto.
- Dynamic GPIO numbers, device tree support, daisy chaining and some
other fixes for the 74x164 driver by Maxime Ripard.
- IRQ domain and device tree support for the tc3589x driver by Lee
Jones.
- Some conversion to use managed resources devm_* code.
- Some instances of clk_prepare() or clk_prepare_enable() added to
support the new, stricter common clock framework.
- Some for_each_set_bit() simplifications.
- Then a lot of fixes as we fixed up all of the above tripping over
our own shoelaces and that kind of thing."
* tag 'gpio-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (34 commits)
gpio: pcf857x: select IRQ_DOMAIN
gpio: Document device_node's det_debounce
gpio-lpc32xx: Add GPI_28
gpio: adnp: dt: Reference generic interrupt binding
gpio: Add Avionic Design N-bit GPIO expander support
gpio: pxa: using for_each_set_bit to simplify the code
gpio_msm: using for_each_set_bit to simplify the code
gpio: Enable the tc3298x GPIO expander driver for Device Tree
gpio: Provide the tc3589x GPIO expander driver with an IRQ domain
ARM: shmobile: kzm9g: use gpio-keys instead of gpio-keys-polled
gpio: pcf857x: fixup smatch WARNING
gpio: 74x164: Add support for the daisy-chaining
gpio: 74x164: dts: Add documentation for the dt binding
dt: Fix incorrect reference in gpio-led documentation
gpio: 74x164: Add device tree support
gpio: 74x164: Use dynamic gpio number assignment if no pdata is present
gpio: 74x164: Use devm_kzalloc
gpio: 74x164: Use module_spi_driver boiler plate function
gpio: sx150x: Use irq_data_get_irq_chip_data() at appropriate places
gpio: em: Use irq_data_get_irq_chip_data() at appropriate places
...
30 files changed, 1104 insertions, 248 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74x164.txt b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt new file mode 100644 index 000000000000..cc2608021f26 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-74x164.txt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | * Generic 8-bits shift register GPIO driver | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Should be "fairchild,74hc595" | ||
| 5 | - reg : chip select number | ||
| 6 | - gpio-controller : Marks the device node as a gpio controller. | ||
| 7 | - #gpio-cells : Should be two. The first cell is the pin number and | ||
| 8 | the second cell is used to specify the gpio polarity: | ||
| 9 | 0 = active high | ||
| 10 | 1 = active low | ||
| 11 | - registers-number: Number of daisy-chained shift registers | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | gpio5: gpio5@0 { | ||
| 16 | compatible = "fairchild,74hc595"; | ||
| 17 | reg = <0>; | ||
| 18 | gpio-controller; | ||
| 19 | #gpio-cells = <2>; | ||
| 20 | registers-number = <4>; | ||
| 21 | spi-max-frequency = <100000>; | ||
| 22 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-adnp.txt b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt new file mode 100644 index 000000000000..af66b2724837 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-adnp.txt | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | Avionic Design N-bit GPIO expander bindings | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "ad,gpio-adnp" | ||
| 5 | - reg: The I2C slave address for this device. | ||
| 6 | - interrupt-parent: phandle of the parent interrupt controller. | ||
| 7 | - interrupts: Interrupt specifier for the controllers interrupt. | ||
| 8 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the | ||
| 9 | second cell is used to specify optional parameters: | ||
| 10 | - bit 0: polarity (0: normal, 1: inverted) | ||
| 11 | - gpio-controller: Marks the device as a GPIO controller | ||
| 12 | - nr-gpios: The number of pins supported by the controller. | ||
| 13 | |||
| 14 | The GPIO expander can optionally be used as an interrupt controller, in | ||
| 15 | which case it uses the default two cell specifier as described in | ||
| 16 | Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. | ||
| 17 | |||
| 18 | Example: | ||
| 19 | |||
| 20 | gpioext: gpio-controller@41 { | ||
| 21 | compatible = "ad,gpio-adnp"; | ||
| 22 | reg = <0x41>; | ||
| 23 | |||
| 24 | interrupt-parent = <&gpio>; | ||
| 25 | interrupts = <160 1>; | ||
| 26 | |||
| 27 | gpio-controller; | ||
| 28 | #gpio-cells = <2>; | ||
| 29 | |||
| 30 | interrupt-controller; | ||
| 31 | #interrupt-cells = <2>; | ||
| 32 | |||
| 33 | nr-gpios = <64>; | ||
| 34 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/led.txt b/Documentation/devicetree/bindings/gpio/led.txt index 9bb308abd221..edc83c1c0d54 100644 --- a/Documentation/devicetree/bindings/gpio/led.txt +++ b/Documentation/devicetree/bindings/gpio/led.txt | |||
| @@ -8,7 +8,7 @@ node's name represents the name of the corresponding LED. | |||
| 8 | 8 | ||
| 9 | LED sub-node properties: | 9 | LED sub-node properties: |
| 10 | - gpios : Should specify the LED's GPIO, see "gpios property" in | 10 | - gpios : Should specify the LED's GPIO, see "gpios property" in |
| 11 | Documentation/devicetree/gpio.txt. Active low LEDs should be | 11 | Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be |
| 12 | indicated using flags in the GPIO specifier. | 12 | indicated using flags in the GPIO specifier. |
| 13 | - label : (optional) The label for this LED. If omitted, the label is | 13 | - label : (optional) The label for this LED. If omitted, the label is |
| 14 | taken from the node name (excluding the unit address). | 14 | taken from the node name (excluding the unit address). |
diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig index 5d0c66708960..c88b57886e79 100644 --- a/arch/arm/configs/kzm9g_defconfig +++ b/arch/arm/configs/kzm9g_defconfig | |||
| @@ -23,7 +23,6 @@ CONFIG_MODULE_UNLOAD=y | |||
| 23 | # CONFIG_IOSCHED_DEADLINE is not set | 23 | # CONFIG_IOSCHED_DEADLINE is not set |
| 24 | # CONFIG_IOSCHED_CFQ is not set | 24 | # CONFIG_IOSCHED_CFQ is not set |
| 25 | CONFIG_ARCH_SHMOBILE=y | 25 | CONFIG_ARCH_SHMOBILE=y |
| 26 | CONFIG_KEYBOARD_GPIO_POLLED=y | ||
| 27 | CONFIG_ARCH_SH73A0=y | 26 | CONFIG_ARCH_SH73A0=y |
| 28 | CONFIG_MACH_KZM9G=y | 27 | CONFIG_MACH_KZM9G=y |
| 29 | CONFIG_MEMORY_START=0x41000000 | 28 | CONFIG_MEMORY_START=0x41000000 |
| @@ -71,6 +70,7 @@ CONFIG_INPUT_SPARSEKMAP=y | |||
| 71 | # CONFIG_INPUT_MOUSEDEV is not set | 70 | # CONFIG_INPUT_MOUSEDEV is not set |
| 72 | CONFIG_INPUT_EVDEV=y | 71 | CONFIG_INPUT_EVDEV=y |
| 73 | # CONFIG_KEYBOARD_ATKBD is not set | 72 | # CONFIG_KEYBOARD_ATKBD is not set |
| 73 | CONFIG_KEYBOARD_GPIO=y | ||
| 74 | # CONFIG_INPUT_MOUSE is not set | 74 | # CONFIG_INPUT_MOUSE is not set |
| 75 | CONFIG_INPUT_TOUCHSCREEN=y | 75 | CONFIG_INPUT_TOUCHSCREEN=y |
| 76 | CONFIG_TOUCHSCREEN_ST1232=y | 76 | CONFIG_TOUCHSCREEN_ST1232=y |
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index 773a2b95a4e0..0a43f3189c21 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c | |||
| @@ -482,12 +482,10 @@ static struct gpio_keys_button gpio_buttons[] = { | |||
| 482 | static struct gpio_keys_platform_data gpio_key_info = { | 482 | static struct gpio_keys_platform_data gpio_key_info = { |
| 483 | .buttons = gpio_buttons, | 483 | .buttons = gpio_buttons, |
| 484 | .nbuttons = ARRAY_SIZE(gpio_buttons), | 484 | .nbuttons = ARRAY_SIZE(gpio_buttons), |
| 485 | .poll_interval = 250, /* poling at this point */ | ||
| 486 | }; | 485 | }; |
| 487 | 486 | ||
| 488 | static struct platform_device gpio_keys_device = { | 487 | static struct platform_device gpio_keys_device = { |
| 489 | /* gpio-pcf857x.c driver doesn't support gpio_to_irq() */ | 488 | .name = "gpio-keys", |
| 490 | .name = "gpio-keys-polled", | ||
| 491 | .dev = { | 489 | .dev = { |
| 492 | .platform_data = &gpio_key_info, | 490 | .platform_data = &gpio_key_info, |
| 493 | }, | 491 | }, |
| @@ -550,6 +548,7 @@ static struct platform_device fsi_ak4648_device = { | |||
| 550 | /* I2C */ | 548 | /* I2C */ |
| 551 | static struct pcf857x_platform_data pcf8575_pdata = { | 549 | static struct pcf857x_platform_data pcf8575_pdata = { |
| 552 | .gpio_base = GPIO_PCF8575_BASE, | 550 | .gpio_base = GPIO_PCF8575_BASE, |
| 551 | .irq = intcs_evt2irq(0x3260), /* IRQ19 */ | ||
| 553 | }; | 552 | }; |
| 554 | 553 | ||
| 555 | static struct i2c_board_info i2c0_devices[] = { | 554 | static struct i2c_board_info i2c0_devices[] = { |
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index a00b828b1643..8382dc832929 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
| @@ -82,7 +82,7 @@ config GPIO_GENERIC | |||
| 82 | 82 | ||
| 83 | config GPIO_DA9052 | ||
