Lines Matching +full:int +full:- +full:gpios
1 /* SPDX-License-Identifier: GPL-2.0+ */
5 * Copyright (c) 2007-2008 MontaVista Software, Inc.
21 * This is Linux-specific flags. By default controllers' and Linux' mapping
23 * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
52 extern int of_get_named_gpio_flags(struct device_node *np,
53 const char *list_name, int index, enum of_gpio_flags *flags);
55 extern int of_mm_gpiochip_add_data(struct device_node *np,
58 static inline int of_mm_gpiochip_add(struct device_node *np, in of_mm_gpiochip_add()
70 static inline int of_get_named_gpio_flags(struct device_node *np, in of_get_named_gpio_flags()
71 const char *list_name, int index, enum of_gpio_flags *flags) in of_get_named_gpio_flags()
76 return -ENOSYS; in of_get_named_gpio_flags()
82 * of_gpio_named_count() - Count GPIOs for a device
83 * @np: device node to count GPIOs for
86 * The function returns the count of GPIOs specified for a node.
88 * Number of gpios defined in property,
89 * -EINVAL for an incorrectly formed gpios property, or
90 * -ENOENT for a missing gpios property
93 * gpios = <0
98 * The above example defines four GPIOs, two of which are not specified.
101 static inline int of_gpio_named_count(struct device_node *np, const char* propname) in of_gpio_named_count()
103 return of_count_phandle_with_args(np, propname, "#gpio-cells"); in of_gpio_named_count()
107 * of_gpio_count() - Count GPIOs for a device
108 * @np: device node to count GPIOs for
110 * Same as of_gpio_named_count, but hard coded to use the 'gpios' property
112 static inline int of_gpio_count(struct device_node *np) in of_gpio_count()
114 return of_gpio_named_count(np, "gpios"); in of_gpio_count()
117 static inline int of_get_gpio_flags(struct device_node *np, int index, in of_get_gpio_flags()
120 return of_get_named_gpio_flags(np, "gpios", index, flags); in of_get_gpio_flags()
124 * of_get_named_gpio() - Get a GPIO number to use with GPIO API
132 static inline int of_get_named_gpio(struct device_node *np, in of_get_named_gpio()
133 const char *propname, int index) in of_get_named_gpio()
139 * of_get_gpio() - Get a GPIO number to use with GPIO API
146 static inline int of_get_gpio(struct device_node *np, int index) in of_get_gpio()