Lines Matching refs:flags

100                                                       enum of_gpio_flags *flags)
108 ret = chip->of_xlate(chip, gpiospec, flags);
135 static void of_gpio_flags_quirks(struct device_node *np, const char *propname, enum of_gpio_flags *flags, int index)
149 * the polarity of the GPIO line. Any phandle flags must
152 if ((*flags & OF_GPIO_ACTIVE_LOW) && !active_low) {
154 *flags &= ~OF_GPIO_ACTIVE_LOW;
157 *flags |= OF_GPIO_ACTIVE_LOW;
165 *flags |= (OF_GPIO_SINGLE_ENDED | OF_GPIO_OPEN_DRAIN);
172 * to determine if the flags should have inverted semantics.
199 if (*flags & OF_GPIO_ACTIVE_LOW) {
201 *flags &= ~OF_GPIO_ACTIVE_LOW;
204 if (!(*flags & OF_GPIO_ACTIVE_LOW)) {
207 *flags |= OF_GPIO_ACTIVE_LOW;
218 *flags |= OF_GPIO_ACTIVE_LOW;
223 * of_get_named_gpiod_flags() - Get a GPIO descriptor and flags for GPIO API
227 * @flags: a flags pointer to fill in
230 * value on the error condition. If @flags is not NULL the function also fills
231 * in flags for the GPIO.
234 enum of_gpio_flags *flags)
253 desc = of_xlate_and_get_gpiod_flags(chip, &gpiospec, flags);
258 if (flags) {
259 of_gpio_flags_quirks(np, propname, flags, index);
271 int of_get_named_gpio_flags(struct device_node *np, const char *list_name, int index, enum of_gpio_flags *flags)
275 desc = of_get_named_gpiod_flags(np, list_name, index, flags);
289 * @dflags: GPIO initialization flags
303 enum of_gpio_flags flags;
310 desc = of_get_named_gpiod_flags(node, propname, index, &flags);
315 active_low = flags & OF_GPIO_ACTIVE_LOW;
316 single_ended = flags & OF_GPIO_SINGLE_ENDED;
317 open_drain = flags & OF_GPIO_OPEN_DRAIN;
318 transitory = flags & OF_GPIO_TRANSITORY;
344 if (flags & OF_GPIO_PULL_UP) {
348 if (flags & OF_GPIO_PULL_DOWN) {
399 unsigned long *flags)
422 return of_find_gpio(dev, NULL, idx, flags);
490 struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, unsigned int idx, unsigned long *flags)
517 /* This quirk looks up flags and all */
518 desc = of_find_spi_cs_gpio(dev, con_id, idx, flags);
542 *flags |= GPIO_ACTIVE_LOW;
547 *flags |= GPIO_OPEN_DRAIN;
549 *flags |= GPIO_OPEN_SOURCE;
554 *flags |= GPIO_TRANSITORY;
558 *flags |= GPIO_PULL_UP;
561 *flags |= GPIO_PULL_DOWN;
568 * of_parse_own_gpio() - Get a GPIO hog descriptor, names and flags for GPIO API
575 * @dflags: gpiod_flags - optional GPIO initialization flags
729 if (test_bit(FLAG_IS_HOGGED, &descs[i].flags) && descs[i].hog == hog) {
804 * of_gpio_simple_xlate - translate gpiospec to the GPIO number and flags
807 * @flags: a flags pointer to fill in
813 static int of_gpio_simple_xlate(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags)
818 * number and the flags from a single gpio cell -- this is possible,
834 if (flags) {
835 *flags = gpiospec->args[1];