diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 14:17:34 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 14:17:34 -0500 |
| commit | a1df7efedab047a8ea4d5850737f03d3679726a7 (patch) | |
| tree | 0b8d73947b9eff3dc4a49915cccd31f4d928a2ba /include/linux | |
| parent | aa7ed01f93ff7e149cad46f13f66b269d59c9bc0 (diff) | |
| parent | 0a4a3529df40c4be163b3909942b16c6c46b9d03 (diff) | |
Merge tag 'gpio-v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO changes from Linus Walleij:
"This is the GPIO bulk changes for the v3.20 series:
GPIOLIB core changes:
- Create and use of_mm_gpiochip_remove() for removing memory-mapped
OF GPIO chips
- GPIO MMIO library suppports bgpio_set_multiple for switching
several lines at once, a feature merged in the last cycle.
New drivers:
- New driver for the APM X-gene standby GPIO controller
- New driver for the Fujitsu MB86S7x GPIO controller
Cleanups:
- Moved rcar driver to use gpiolib irqchip
- Moxart converted to the GPIO MMIO library
- GE driver converted to GPIO MMIO library
- Move sx150x to irqdomain
- Move max732x to irqdomain
- Move vx855 to use managed resources
- Move dwapb to use managed resources
- Clean tc3589x from platform data
- Clean stmpe driver to use device tree only probe
New subtypes:
- sx1506 support in the sx150x driver
- Quark 1000 SoC support in the SCH driver
- Support X86 in the Xilinx driver
- Support PXA1928 in the PXA driver
Extended drivers:
- max732x supports device tree probe
- sx150x supports device tree probe
Various minor cleanups and bug fixes"
* tag 'gpio-v3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (61 commits)
gpio: kconfig: replace PPC_OF with PPC
gpio: pxa: add PXA1928 gpio type support
dt/bindings: gpio: add compatible string for marvell,pxa1928-gpio
gpio: pxa: remove mach IRQ includes
gpio: max732x: use an inline function for container cast
gpio: use sizeof() instead of hardcoded values
gpio: max732x: add set_multiple function
gpio: sch: Consolidate similar algorithms
gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation
gpio: ge: Convert to use devm_kstrdup
gpio: correctly use const char * const
gpio: sx150x: fixup OF support
gpio: mpc8xxx: Use of_mm_gpiochip_remove
gpio: Add Fujitsu MB86S7x GPIO driver
gpio: mpc8xxx: Convert to platform device interface.
gpio: zevio: Use of_mm_gpiochip_remove
gpio: gpio-mm-lantiq: Use of_mm_gpiochip_remove
gpio: gpio-mm-lantiq: Use of_property_read_u32
gpio: gpio-mm-lantiq: Do not replicate code
gpio :gpio-mm-lantiq: Use devm_kzalloc
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/gpio/consumer.h | 17 | ||||
| -rw-r--r-- | include/linux/mfd/stmpe.h | 16 | ||||
| -rw-r--r-- | include/linux/mfd/tc3589x.h | 12 | ||||
| -rw-r--r-- | include/linux/of_gpio.h | 1 |
4 files changed, 10 insertions, 36 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index fd85cb120ee0..45afc2dee560 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
| @@ -340,31 +340,32 @@ static inline int desc_to_gpio(const struct gpio_desc *desc) | |||
| 340 | * etc. | 340 | * etc. |
| 341 | */ | 341 | */ |
| 342 | #define __gpiod_get(dev, con_id, flags, ...) __gpiod_get(dev, con_id, flags) | 342 | #define __gpiod_get(dev, con_id, flags, ...) __gpiod_get(dev, con_id, flags) |
| 343 | #define gpiod_get(varargs...) __gpiod_get(varargs, 0) | 343 | #define gpiod_get(varargs...) __gpiod_get(varargs, GPIOD_ASIS) |
| 344 | #define __gpiod_get_index(dev, con_id, index, flags, ...) \ | 344 | #define __gpiod_get_index(dev, con_id, index, flags, ...) \ |
| 345 | __gpiod_get_index(dev, con_id, index, flags) | 345 | __gpiod_get_index(dev, con_id, index, flags) |
| 346 | #define gpiod_get_index(varargs...) __gpiod_get_index(varargs, 0) | 346 | #define gpiod_get_index(varargs...) __gpiod_get_index(varargs, GPIOD_ASIS) |
| 347 | #define __gpiod_get_optional(dev, con_id, flags, ...) \ | 347 | #define __gpiod_get_optional(dev, con_id, flags, ...) \ |
| 348 | __gpiod_get_optional(dev, con_id, flags) | 348 | __gpiod_get_optional(dev, con_id, flags) |
| 349 | #define gpiod_get_optional(varargs...) __gpiod_get_optional(varargs, 0) | 349 | #define gpiod_get_optional(varargs...) __gpiod_get_optional(varargs, GPIOD_ASIS) |
| 350 | #define __gpiod_get_index_optional(dev, con_id, index, flags, ...) \ | 350 | #define __gpiod_get_index_optional(dev, con_id, index, flags, ...) \ |
| 351 | __gpiod_get_index_optional(dev, con_id, index, flags) | 351 | __gpiod_get_index_optional(dev, con_id, index, flags) |
| 352 | #define gpiod_get_index_optional(varargs...) \ | 352 | #define gpiod_get_index_optional(varargs...) \ |
| 353 | __gpiod_get_index_optional(varargs, 0) | 353 | __gpiod_get_index_optional(varargs, GPIOD_ASIS) |
| 354 | #define __devm_gpiod_get(dev, con_id, flags, ...) \ | 354 | #define __devm_gpiod_get(dev, con_id, flags, ...) \ |
| 355 | __devm_gpiod_get(dev, con_id, flags) | 355 | __devm_gpiod_get(dev, con_id, flags) |
| 356 | #define devm_gpiod_get(varargs...) __devm_gpiod_get(varargs, 0) | 356 | #define devm_gpiod_get(varargs...) __devm_gpiod_get(varargs, GPIOD_ASIS) |
| 357 | #define __devm_gpiod_get_index(dev, con_id, index, flags, ...) \ | 357 | #define __devm_gpiod_get_index(dev, con_id, index, flags, ...) \ |
| 358 | __devm_gpiod_get_index(dev, con_id, index, flags) | 358 | __devm_gpiod_get_index(dev, con_id, index, flags) |
| 359 | #define devm_gpiod_get_index(varargs...) __devm_gpiod_get_index(varargs, 0) | 359 | #define devm_gpiod_get_index(varargs...) \ |
| 360 | __devm_gpiod_get_index(varargs, GPIOD_ASIS) | ||
| 360 | #define __devm_gpiod_get_optional(dev, con_id, flags, ...) \ | 361 | #define __devm_gpiod_get_optional(dev, con_id, flags, ...) \ |
| 361 | __devm_gpiod_get_optional(dev, con_id, flags) | 362 | __devm_gpiod_get_optional(dev, con_id, flags) |
| 362 | #define devm_gpiod_get_optional(varargs...) \ | 363 | #define devm_gpiod_get_optional(varargs...) \ |
| 363 | __devm_gpiod_get_optional(varargs, 0) | 364 | __devm_gpiod_get_optional(varargs, GPIOD_ASIS) |
| 364 | #define __devm_gpiod_get_index_optional(dev, con_id, index, flags, ...) \ | 365 | #define __devm_gpiod_get_index_optional(dev, con_id, index, flags, ...) \ |
| 365 | __devm_gpiod_get_index_optional(dev, con_id, index, flags) | 366 | __devm_gpiod_get_index_optional(dev, con_id, index, flags) |
| 366 | #define devm_gpiod_get_index_optional(varargs...) \ | 367 | #define devm_gpiod_get_index_optional(varargs...) \ |
| 367 | __devm_gpiod_get_index_optional(varargs, 0) | 368 | __devm_gpiod_get_index_optional(varargs, GPIOD_ASIS) |
| 368 | 369 | ||
| 369 | #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) | 370 | #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) |
| 370 | 371 | ||
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h index f742b6717d52..c9d869027300 100644 --- a/include/linux/mfd/stmpe.h +++ b/include/linux/mfd/stmpe.h | |||
| @@ -118,20 +118,6 @@ extern int stmpe_disable(struct stmpe *stmpe, unsigned int blocks); | |||
| 118 | #define STMPE_GPIO_NOREQ_811_TOUCH (0xf0) | 118 | #define STMPE_GPIO_NOREQ_811_TOUCH (0xf0) |
| 119 | 119 | ||
| 120 | /** | 120 | /** |
| 121 | * struct stmpe_gpio_platform_data - STMPE GPIO platform data | ||
| 122 | * @norequest_mask: bitmask specifying which GPIOs should _not_ be | ||
| 123 | * requestable due to different usage (e.g. touch, keypad) | ||
| 124 | * STMPE_GPIO_NOREQ_* macros can be used here. | ||
| 125 | * @setup: board specific setup callback. | ||
| 126 | * @remove: board specific remove callback | ||
| 127 | */ | ||
| 128 | struct stmpe_gpio_platform_data { | ||
| 129 | unsigned norequest_mask; | ||
| 130 | void (*setup)(struct stmpe *stmpe, unsigned gpio_base); | ||
| 131 | void (*remove)(struct stmpe *stmpe, unsigned gpio_base); | ||
| 132 | }; | ||
| 133 | |||
| 134 | /** | ||
| 135 | * struct stmpe_ts_platform_data - stmpe811 touch screen controller platform | 121 | * struct stmpe_ts_platform_data - stmpe811 touch screen controller platform |
| 136 | * data | 122 | * data |
| 137 | * @sample_time: ADC converstion time in number of clock. | 123 | * @sample_time: ADC converstion time in number of clock. |
| @@ -182,7 +168,6 @@ struct stmpe_ts_platform_data { | |||
| 182 | * @irq_over_gpio: true if gpio is used to get irq | 168 | * @irq_over_gpio: true if gpio is used to get irq |
| 183 | * @irq_gpio: gpio number over which irq will be requested (significant only if | 169 | * @irq_gpio: gpio number over which irq will be requested (significant only if |
| 184 | * irq_over_gpio is true) | 170 | * irq_over_gpio is true) |
| 185 | * @gpio: GPIO-specific platform data | ||
| 186 | * @ts: touchscreen-specific platform data | 171 | * @ts: touchscreen-specific platform data |
| 187 | */ | 172 | */ |
| 188 | struct stmpe_platform_data { | 173 | struct stmpe_platform_data { |
| @@ -194,7 +179,6 @@ struct stmpe_platform_data { | |||
| 194 | int irq_gpio; | 179 | int irq_gpio; |
| 195 | int autosleep_timeout; | 180 | int autosleep_timeout; |
| 196 | 181 | ||
| 197 | struct stmpe_gpio_platform_data *gpio; | ||
| 198 | struct stmpe_ts_platform_data *ts; | 182 | struct stmpe_ts_platform_data *ts; |
| 199 | }; | 183 | }; |
| 200 | 184 | ||
diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h index e1c12d84c26a..c203c9c56776 100644 --- a/include/linux/mfd/tc3589x.h +++ b/include/linux/mfd/tc3589x.h | |||
| @@ -163,24 +163,12 @@ struct tc3589x_keypad_platform_data { | |||
| 163 | }; | 163 | }; |
| 164 | 164 | ||
| 165 | /** | 165 | /** |
| 166 | * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data | ||
| 167 | * @setup: callback for board-specific initialization | ||
| 168 | * @remove: callback for board-specific teardown | ||
| 169 | */ | ||
| 170 | struct tc3589x_gpio_platform_data { | ||
| 171 | void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base); | ||
| 172 | void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base); | ||
| 173 | }; | ||
| 174 | |||
| 175 | /** | ||
| 176 | * struct tc3589x_platform_data - TC3589x platform data | 166 | * struct tc3589x_platform_data - TC3589x platform data |
| 177 | * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) | 167 | * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) |
| 178 | * @gpio: GPIO-specific platform data | ||
| 179 | * @keypad: keypad-specific platform data | 168 | * @keypad: keypad-specific platform data |
| 180 | */ | 169 | */ |
| 181 | struct tc3589x_platform_data { | 170 | struct tc3589x_platform_data { |
| 182 | unsigned int block; | 171 | unsigned int block; |
| 183 | struct tc3589x_gpio_platform_data *gpio; | ||
| 184 | const struct tc3589x_keypad_platform_data *keypad; | 172 | const struct tc3589x_keypad_platform_data *keypad; |
| 185 | }; | 173 | }; |
| 186 | 174 | ||
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 38fc05036015..69dbe312b11b 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h | |||
| @@ -52,6 +52,7 @@ extern int of_get_named_gpio_flags(struct device_node *np, | |||
| 52 | 52 | ||
| 53 | extern int of_mm_gpiochip_add(struct device_node *np, | 53 | extern int of_mm_gpiochip_add(struct device_node *np, |
| 54 | struct of_mm_gpio_chip *mm_gc); | 54 | struct of_mm_gpio_chip *mm_gc); |
| 55 | extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc); | ||
| 55 | 56 | ||
| 56 | extern void of_gpiochip_add(struct gpio_chip *gc); | 57 | extern void of_gpiochip_add(struct gpio_chip *gc); |
| 57 | extern void of_gpiochip_remove(struct gpio_chip *gc); | 58 | extern void of_gpiochip_remove(struct gpio_chip *gc); |
