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.
53 extern int of_get_named_gpio_flags(const struct device_node *np,
54 const char *list_name, int index, enum of_gpio_flags *flags);
56 extern int of_mm_gpiochip_add_data(struct device_node *np,
59 static inline int of_mm_gpiochip_add(struct device_node *np, in of_mm_gpiochip_add()
71 static inline int of_get_named_gpio_flags(const struct device_node *np, in of_get_named_gpio_flags()
72 const char *list_name, int index, enum of_gpio_flags *flags) in of_get_named_gpio_flags()
77 return -ENOSYS; in of_get_named_gpio_flags()
83 * of_gpio_named_count() - Count GPIOs for a device
84 * @np: device node to count GPIOs for
87 * The function returns the count of GPIOs specified for a node.
89 * Number of gpios defined in property,
90 * -EINVAL for an incorrectly formed gpios property, or
91 * -ENOENT for a missing gpios property
94 * gpios = <0
99 * The above example defines four GPIOs, two of which are not specified.
102 static inline int of_gpio_named_count(const struct device_node *np, in of_gpio_named_count()
105 return of_count_phandle_with_args(np, propname, "#gpio-cells"); in of_gpio_named_count()
109 * of_gpio_count() - Count GPIOs for a device
110 * @np: device node to count GPIOs for
112 * Same as of_gpio_named_count, but hard coded to use the 'gpios' property
114 static inline int of_gpio_count(const struct device_node *np) in of_gpio_count()
116 return of_gpio_named_count(np, "gpios"); in of_gpio_count()
119 static inline int of_get_gpio_flags(const struct device_node *np, int index, in of_get_gpio_flags()
122 return of_get_named_gpio_flags(np, "gpios", index, flags); in of_get_gpio_flags()
126 * of_get_named_gpio() - Get a GPIO number to use with GPIO API
134 static inline int of_get_named_gpio(const struct device_node *np, in of_get_named_gpio()
135 const char *propname, int index) in of_get_named_gpio()
141 * of_get_gpio() - Get a GPIO number to use with GPIO API
148 static inline int of_get_gpio(const struct device_node *np, int index) in of_get_gpio()