diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-05-17 21:54:40 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-05-19 00:48:36 +0200 |
commit | 3d0f7cf0f3633f92ddeb767eb59cab73963d4dee (patch) | |
tree | be23f5d9657d558d690adc84b16bdd6d91668f47 /include | |
parent | gpiolib: Implement devm_gpio_request_one() (diff) | |
download | linux-3d0f7cf0f3633f92ddeb767eb59cab73963d4dee.tar.xz linux-3d0f7cf0f3633f92ddeb767eb59cab73963d4dee.zip |
gpio: Adjust of_xlate API to support multiple GPIO chips
This patch changes the of_xlate API to make it possible for multiple
gpio_chips to refer to the same device tree node. This is useful for
banked GPIO controllers that use multiple gpio_chips for a single
device. With this change the core code will try calling of_xlate on
each gpio_chip that references the device_node and will return the
gpio number for the first one to return 'true'.
Tested-by: Roland Stigge <stigge@antcom.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/gpio.h | 2 | ||||
-rw-r--r-- | include/linux/of_gpio.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 4ead12332c66..1ba08f0e49a3 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -144,7 +144,7 @@ extern int gpiochip_add(struct gpio_chip *chip); extern int __must_check gpiochip_remove(struct gpio_chip *chip); extern struct gpio_chip *gpiochip_find(const void *data, int (*match)(struct gpio_chip *chip, - const void *data)); + void *data)); /* Always use the library code for GPIO management calls, diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 81733d12cbea..c454f5796747 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h @@ -58,7 +58,6 @@ extern int of_mm_gpiochip_add(struct device_node *np, extern void of_gpiochip_add(struct gpio_chip *gc); extern void of_gpiochip_remove(struct gpio_chip *gc); -extern struct gpio_chip *of_node_to_gpiochip(struct device_node *np); extern int of_gpio_simple_xlate(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags); |