diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 17:50:57 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 17:50:57 -0400 |
| commit | c7c8518498e82591d7784452f5674c3aeb4d079c (patch) | |
| tree | 790ff7e6b6741daf32ec686b9a302b957b07c0f4 /include/linux | |
| parent | ece236ce2fad9c27a6fd2530f899289025194bce (diff) | |
| parent | 591567a5ea25852f20b7ef2953f6f72020121199 (diff) | |
Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: (61 commits)
gpio/mxc/mxs: fix build error introduced by the irq_gc_ack() renaming
mcp23s08: add i2c support
mcp23s08: isolate spi specific parts
mcp23s08: get rid of setup/teardown callbacks
gpio/tegra: dt: add binding for gpio polarity
mcp23s08: remove unused work queue
gpio/da9052: remove a redundant assignment for gpio->da9052
gpio/mxc: add device tree probe support
ARM: mxc: use ARCH_NR_GPIOS to define gpio number
gpio/mxc: get rid of the uses of cpu_is_mx()
gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables
gpio: Move mpc5200 gpio driver to drivers/gpio
GPIO: DA9052 GPIO module v3
gpio/tegra: Use engineering names in DT compatible property
of/gpio: Add new method for getting gpios under different property names
gpio/dt: Refine GPIO device tree binding
gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err
gpio/pca953x: Deprecate meaningless device-tree bindings
gpio/pca953x: Remove dynamic platform data pointer
gpio/pca953x: Fix IRQ support.
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/of_gpio.h | 42 | ||||
| -rw-r--r-- | include/linux/spi/74x164.h | 2 | ||||
| -rw-r--r-- | include/linux/spi/mcp23s08.h | 9 |
3 files changed, 37 insertions, 16 deletions
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 6598c04dab01..aec8025c786a 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h | |||
| @@ -46,8 +46,9 @@ static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc) | |||
| 46 | return container_of(gc, struct of_mm_gpio_chip, gc); | 46 | return container_of(gc, struct of_mm_gpio_chip, gc); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | extern int of_get_gpio_flags(struct device_node *np, int index, | 49 | extern int of_get_named_gpio_flags(struct device_node *np, |
| 50 | enum of_gpio_flags *flags); | 50 | const char *list_name, int index, enum of_gpio_flags *flags); |
| 51 | |||
| 51 | extern unsigned int of_gpio_count(struct device_node *np); | 52 | extern unsigned int of_gpio_count(struct device_node *np); |
| 52 | 53 | ||
| 53 | extern int of_mm_gpiochip_add(struct device_node *np, | 54 | extern int of_mm_gpiochip_add(struct device_node *np, |
| @@ -60,8 +61,8 @@ extern struct gpio_chip *of_node_to_gpiochip(struct device_node *np); | |||
| 60 | #else /* CONFIG_OF_GPIO */ | 61 | #else /* CONFIG_OF_GPIO */ |
| 61 | 62 | ||
| 62 | /* Drivers may not strictly depend on the GPIO support, so let them link. */ | 63 | /* Drivers may not strictly depend on the GPIO support, so let them link. */ |
| 63 | static inline int of_get_gpio_flags(struct device_node *np, int index, | 64 | static inline int of_get_named_gpio_flags(struct device_node *np, |
| 64 | enum of_gpio_flags *flags) | 65 | const char *list_name, int index, enum of_gpio_flags *flags) |
| 65 | { | 66 | { |
| 66 | return -ENOSYS; | 67 | return -ENOSYS; |
| 67 | } | 68 | } |
| @@ -77,7 +78,38 @@ static inline void of_gpiochip_remove(struct gpio_chip *gc) { } | |||
| 77 | #endif /* CONFIG_OF_GPIO */ | 78 | #endif /* CONFIG_OF_GPIO */ |
| 78 | 79 | ||
| 79 | /** | 80 | /** |
| 80 | * of_get_gpio - Get a GPIO number to use with GPIO API | 81 | * of_get_gpio_flags() - Get a GPIO number and flags to use with GPIO API |
| 82 | * @np: device node to get GPIO from | ||
| 83 | * @index: index of the GPIO | ||
| 84 | * @flags: a flags pointer to fill in | ||
| 85 | * | ||
| 86 | * Returns GPIO number to use with Linux generic GPIO API, or one of the errno | ||
| 87 | * value on the error condition. If @flags is not NULL the function also fills | ||
| 88 | * in flags for the GPIO. | ||
| 89 | */ | ||
| 90 | static inline int of_get_gpio_flags(struct device_node *np, int index, | ||
| 91 | enum of_gpio_flags *flags) | ||
| 92 | { | ||
| 93 | return of_get_named_gpio_flags(np, "gpios", index, flags); | ||
| 94 | } | ||
| 95 | |||
| 96 | /** | ||
| 97 | * of_get_named_gpio() - Get a GPIO number to use with GPIO API | ||
| 98 | * @np: device node to get GPIO from | ||
| 99 | * @propname: Name of property containing gpio specifier(s) | ||
| 100 | * @index: index of the GPIO | ||
| 101 | * | ||
| 102 | * Returns GPIO number to use with Linux generic GPIO API, or one of the errno | ||
| 103 | * value on the error condition. | ||
| 104 | */ | ||
| 105 | static inline int of_get_named_gpio(struct device_node *np, | ||
| 106 | const char *propname, int index) | ||
| 107 | { | ||
| 108 | return of_get_named_gpio_flags(np, propname, index, NULL); | ||
| 109 | } | ||
| 110 | |||
| 111 | /** | ||
| 112 | * of_get_gpio() - Get a GPIO number to use with GPIO API | ||
| 81 | * @np: device node to get GPIO from | 113 | * @np: device node to get GPIO from |
| 82 | * @index: index of the GPIO | 114 | * @index: index of the GPIO |
| 83 | * | 115 | * |
diff --git a/include/linux/spi/74x164.h b/include/linux/spi/74x164.h index d85c52f294a0..0aa6acc73317 100644 --- a/include/linux/spi/74x164.h +++ b/include/linux/spi/74x164.h | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #ifndef LINUX_SPI_74X164_H | 1 | #ifndef LINUX_SPI_74X164_H |
| 2 | #define LINUX_SPI_74X164_H | 2 | #define LINUX_SPI_74X164_H |
| 3 | 3 | ||
| 4 | #define GEN_74X164_DRIVER_NAME "74x164" | ||
| 5 | |||
| 6 | struct gen_74x164_chip_platform_data { | 4 | struct gen_74x164_chip_platform_data { |
| 7 | /* number assigned to the first GPIO */ | 5 | /* number assigned to the first GPIO */ |
| 8 | unsigned base; | 6 | unsigned base; |
diff --git a/include/linux/spi/mcp23s08.h b/include/linux/spi/mcp23s08.h index c42cff8ca191..2d676d5aaa89 100644 --- a/include/linux/spi/mcp23s08.h +++ b/include/linux/spi/mcp23s08.h | |||
| @@ -22,13 +22,4 @@ struct mcp23s08_platform_data { | |||
| 22 | * base to base+15 (or base+31 for s17 variant). | 22 | * base to base+15 (or base+31 for s17 variant). |
| 23 | */ | 23 | */ |
| 24 | unsigned base; | 24 | unsigned base; |
| 25 | |||
| 26 | void *context; /* param to setup/teardown */ | ||
| 27 | |||
| 28 | int (*setup)(struct spi_device *spi, | ||
| 29 | int gpio, unsigned ngpio, | ||
| 30 | void *context); | ||
| 31 | int (*teardown)(struct spi_device *spi, | ||
| 32 | int gpio, unsigned ngpio, | ||
| 33 | void *context); | ||
| 34 | }; | 25 | }; |
