Lines Matching defs:gpio
6 #include <linux/gpio/driver.h>
34 static int airoha_dir_set(struct gpio_chip *gc, unsigned int gpio,
38 u32 dir = ioread32(ctrl->dir[gpio / 16]);
40 u32 mask = BIT((gpio % 16) * 2);
44 output |= BIT(gpio);
47 output &= ~BIT(gpio);
50 iowrite32(dir, ctrl->dir[gpio / 16]);
53 gc->set(gc, gpio, val);
60 static int airoha_dir_out(struct gpio_chip *gc, unsigned int gpio,
63 return airoha_dir_set(gc, gpio, val, 1);
66 static int airoha_dir_in(struct gpio_chip *gc, unsigned int gpio)
68 return airoha_dir_set(gc, gpio, 0, 0);
71 static int airoha_get_dir(struct gpio_chip *gc, unsigned int gpio)
74 u32 dir = ioread32(ctrl->dir[gpio / 16]);
75 u32 mask = BIT((gpio % 16) * 2);
121 { .compatible = "airoha,en7523-gpio" },
128 .name = "airoha-gpio",