diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 18:57:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 18:57:35 -0400 |
commit | 03c0c29aff7e56b722eb6c47eace222b140d0377 (patch) | |
tree | 47267a19b523159cf36a050ef3c35f4dbdb33016 /include/asm-generic | |
parent | c60c6a96b7bb0f1f8bb635fdfcf5b592aaf062b4 (diff) | |
parent | 7fb8f881c54beb05dd4d2c947dada1c636581d87 (diff) |
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (63 commits)
of/platform: Register of_platform_drivers with an "of:" prefix
of/address: Clean up function declarations
of/spi: call of_register_spi_devices() from spi core code
of: Provide default of_node_to_nid() implementation.
of/device: Make of_device_make_bus_id() usable by other code.
of/irq: Fix endian issues in parsing interrupt specifiers
of: Fix phandle endian issues
of/flattree: fix of_flat_dt_is_compatible() to match the full compatible string
of: remove of_default_bus_ids
of: make of_find_device_by_node generic
microblaze: remove references to of_device and to_of_device
sparc: remove references to of_device and to_of_device
powerpc: remove references to of_device and to_of_device
of/device: Replace of_device with platform_device in includes and core code
of/device: Protect against binding of_platform_drivers to non-OF devices
of: remove asm/of_device.h
of: remove asm/of_platform.h
of/platform: remove all of_bus_type and of_platform_bus_type references
of: Merge of_platform_bus_type with platform_bus_type
drivercore/of: Add OF style matching to platform bus
...
Fix up trivial conflicts in arch/microblaze/kernel/Makefile due to just
some obj-y removals by the devicetree branch, while the microblaze
updates added a new file.
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/gpio.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 4f3d75e1ad39..c7376bf80b06 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -31,6 +31,7 @@ static inline int gpio_is_valid(int number) | |||
31 | struct device; | 31 | struct device; |
32 | struct seq_file; | 32 | struct seq_file; |
33 | struct module; | 33 | struct module; |
34 | struct device_node; | ||
34 | 35 | ||
35 | /** | 36 | /** |
36 | * struct gpio_chip - abstract a GPIO controller | 37 | * struct gpio_chip - abstract a GPIO controller |
@@ -106,6 +107,17 @@ struct gpio_chip { | |||
106 | const char *const *names; | 107 | const char *const *names; |
107 | unsigned can_sleep:1; | 108 | unsigned can_sleep:1; |
108 | unsigned exported:1; | 109 | unsigned exported:1; |
110 | |||
111 | #if defined(CONFIG_OF_GPIO) | ||
112 | /* | ||
113 | * If CONFIG_OF is enabled, then all GPIO controllers described in the | ||
114 | * device tree automatically may have an OF translation | ||
115 | */ | ||
116 | struct device_node *of_node; | ||
117 | int of_gpio_n_cells; | ||
118 | int (*of_xlate)(struct gpio_chip *gc, struct device_node *np, | ||
119 | const void *gpio_spec, u32 *flags); | ||
120 | #endif | ||
109 | }; | 121 | }; |
110 | 122 | ||
111 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, | 123 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, |
@@ -115,6 +127,9 @@ extern int __must_check gpiochip_reserve(int start, int ngpio); | |||
115 | /* add/remove chips */ | 127 | /* add/remove chips */ |
116 | extern int gpiochip_add(struct gpio_chip *chip); | 128 | extern int gpiochip_add(struct gpio_chip *chip); |
117 | extern int __must_check gpiochip_remove(struct gpio_chip *chip); | 129 | extern int __must_check gpiochip_remove(struct gpio_chip *chip); |
130 | extern struct gpio_chip *gpiochip_find(void *data, | ||
131 | int (*match)(struct gpio_chip *chip, | ||
132 | void *data)); | ||
118 | 133 | ||
119 | 134 | ||
120 | /* Always use the library code for GPIO management calls, | 135 | /* Always use the library code for GPIO management calls, |