Lines Matching defs:gpio
13 #include <linux/gpio/driver.h>
96 * @gpio: GPIO signal number.
100 static int xway_stp_get(struct gpio_chip *gc, unsigned int gpio)
104 return (xway_stp_r32(chip->virt, XWAY_STP_CPU0) & BIT(gpio));
110 * @gpio: GPIO signal number.
115 static void xway_stp_set(struct gpio_chip *gc, unsigned gpio, int val)
120 chip->shadow |= BIT(gpio);
122 chip->shadow &= ~BIT(gpio);
129 * xway_stp_dir_out() - gpio_chip->dir_out - set gpio direction.
131 * @gpio: GPIO signal number.
136 static int xway_stp_dir_out(struct gpio_chip *gc, unsigned gpio, int val)
138 xway_stp_set(gc, gpio, val);
146 * @gpio: GPIO signal number.
150 static int xway_stp_request(struct gpio_chip *gc, unsigned gpio)
154 if ((gpio < 8) && (chip->reserved & BIT(gpio))) {
155 dev_err(gc->parent, "GPIO %d is driven by hardware\n", gpio);
260 /* find out which gpio groups should be enabled */
322 { .compatible = "lantiq,gpio-stp-xway" },
330 .name = "gpio-stp-xway",