Lines Matching refs:gpio_chip
75 struct gpio_chip gpio_chip;
83 if (chip->gpio_chip.ngpio <= 8)
100 if (chip->gpio_chip.ngpio <= 8)
114 static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off)
120 chip = container_of(gc, struct pca953x_chip, gpio_chip);
131 static int pca953x_gpio_direction_output(struct gpio_chip *gc,
138 chip = container_of(gc, struct pca953x_chip, gpio_chip);
162 static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
168 chip = container_of(gc, struct pca953x_chip, gpio_chip);
182 static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val)
188 chip = container_of(gc, struct pca953x_chip, gpio_chip);
204 struct gpio_chip *gc;
206 gc = &chip->gpio_chip;
223 static int pca953x_gpio_to_irq(struct gpio_chip *gc, unsigned off)
227 chip = container_of(gc, struct pca953x_chip, gpio_chip);
264 pca953x_gpio_direction_input(&chip->gpio_chip, level);
380 for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) {
405 chip->gpio_chip.to_irq = pca953x_gpio_to_irq;
541 ret = gpiochip_add(&chip->gpio_chip);
546 ret = pdata->setup(client, chip->gpio_chip.base,
547 chip->gpio_chip.ngpio, pdata->context);
569 ret = pdata->teardown(client, chip->gpio_chip.base,
570 chip->gpio_chip.ngpio, pdata->context);
578 ret = gpiochip_remove(&chip->gpio_chip);