mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
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>
This commit is contained in:
parent
09d71ff194
commit
3d0f7cf0f3
5 changed files with 43 additions and 49 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue