Lines Matching defs:gpio
55 #include <linux/gpio/driver.h>
132 static int bgpio_get_set(struct gpio_chip *gc, unsigned int gpio)
134 unsigned long pinmask = bgpio_line2mask(gc, gpio);
167 static int bgpio_get(struct gpio_chip *gc, unsigned int gpio)
169 return !!(gc->read_reg(gc->reg_dat) & bgpio_line2mask(gc, gpio));
214 static void bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
218 static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
220 unsigned long mask = bgpio_line2mask(gc, gpio);
235 static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
238 unsigned long mask = bgpio_line2mask(gc, gpio);
246 static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
248 unsigned long mask = bgpio_line2mask(gc, gpio);
327 static int bgpio_simple_dir_in(struct gpio_chip *gc, unsigned int gpio)
332 static int bgpio_dir_out_err(struct gpio_chip *gc, unsigned int gpio,
338 static int bgpio_simple_dir_out(struct gpio_chip *gc, unsigned int gpio,
341 gc->set(gc, gpio, val);
346 static int bgpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
352 gc->bgpio_dir &= ~bgpio_line2mask(gc, gpio);
364 static int bgpio_get_dir(struct gpio_chip *gc, unsigned int gpio)
368 if (gc->bgpio_dir & bgpio_line2mask(gc, gpio))
374 if (gc->read_reg(gc->reg_dir_out) & bgpio_line2mask(gc, gpio))
380 if (!(gc->read_reg(gc->reg_dir_in) & bgpio_line2mask(gc, gpio)))
386 static void bgpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
392 gc->bgpio_dir |= bgpio_line2mask(gc, gpio);
402 static int bgpio_dir_out_dir_first(struct gpio_chip *gc, unsigned int gpio,
405 bgpio_dir_out(gc, gpio, val);
406 gc->set(gc, gpio, val);
410 static int bgpio_dir_out_val_first(struct gpio_chip *gc, unsigned int gpio,
413 gc->set(gc, gpio, val);
414 bgpio_dir_out(gc, gpio, val);
686 { .compatible = "brcm,bcm6345-gpio" },
687 { .compatible = "wd,mbl-gpio" },
688 { .compatible = "ni,169445-nand-gpio" },
797 .name = "basic-mmio-gpio",
800 .name = "basic-mmio-gpio-be",
809 .name = "basic-mmio-gpio",