Lines Matching refs:gc
50 struct gpio_chip gc; member
89 static int gpio_mockup_get(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_get() argument
91 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get()
101 static int gpio_mockup_get_multiple(struct gpio_chip *gc, in gpio_mockup_get_multiple() argument
104 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get_multiple()
108 for_each_set_bit(bit, mask, gc->ngpio) { in gpio_mockup_get_multiple()
123 static void gpio_mockup_set(struct gpio_chip *gc, in gpio_mockup_set() argument
126 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set()
133 static void gpio_mockup_set_multiple(struct gpio_chip *gc, in gpio_mockup_set_multiple() argument
136 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set_multiple()
140 for_each_set_bit(bit, mask, gc->ngpio) in gpio_mockup_set_multiple()
148 struct gpio_chip *gc = &chip->gc; in gpio_mockup_apply_pull() local
149 struct gpio_desc *desc = gpiochip_get_desc(gc, offset); in gpio_mockup_apply_pull()
193 static int gpio_mockup_set_config(struct gpio_chip *gc, in gpio_mockup_set_config() argument
196 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set_config()
209 static int gpio_mockup_dirout(struct gpio_chip *gc, in gpio_mockup_dirout() argument
212 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_dirout()
222 static int gpio_mockup_dirin(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_dirin() argument
224 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_dirin()
233 static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_get_direction() argument
235 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get_direction()
245 static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_to_irq() argument
247 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_to_irq()
252 static void gpio_mockup_free(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_free() argument
254 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_free()
266 struct gpio_chip *gc; in gpio_mockup_debugfs_read() local
276 gc = &chip->gc; in gpio_mockup_debugfs_read()
278 val = gpio_mockup_get(gc, priv->offset); in gpio_mockup_debugfs_read()
349 struct gpio_chip *gc; in gpio_mockup_debugfs_setup() local
354 gc = &chip->gc; in gpio_mockup_debugfs_setup()
355 devname = dev_name(&gc->gpiodev->dev); in gpio_mockup_debugfs_setup()
359 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_debugfs_setup()
370 priv->desc = gpiochip_get_desc(gc, i); in gpio_mockup_debugfs_setup()
387 struct gpio_chip *gc = &chip->gc; in gpio_mockup_dispose_mappings() local
390 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_dispose_mappings()
400 struct gpio_chip *gc; in gpio_mockup_probe() local
426 gc = &chip->gc; in gpio_mockup_probe()
427 gc->base = base; in gpio_mockup_probe()
428 gc->ngpio = ngpio; in gpio_mockup_probe()
429 gc->label = name; in gpio_mockup_probe()
430 gc->owner = THIS_MODULE; in gpio_mockup_probe()
431 gc->parent = dev; in gpio_mockup_probe()
432 gc->get = gpio_mockup_get; in gpio_mockup_probe()
433 gc->set = gpio_mockup_set; in gpio_mockup_probe()
434 gc->get_multiple = gpio_mockup_get_multiple; in gpio_mockup_probe()
435 gc->set_multiple = gpio_mockup_set_multiple; in gpio_mockup_probe()
436 gc->direction_output = gpio_mockup_dirout; in gpio_mockup_probe()
437 gc->direction_input = gpio_mockup_dirin; in gpio_mockup_probe()
438 gc->get_direction = gpio_mockup_get_direction; in gpio_mockup_probe()
439 gc->set_config = gpio_mockup_set_config; in gpio_mockup_probe()
440 gc->to_irq = gpio_mockup_to_irq; in gpio_mockup_probe()
441 gc->free = gpio_mockup_free; in gpio_mockup_probe()
443 chip->lines = devm_kcalloc(dev, gc->ngpio, in gpio_mockup_probe()
448 for (i = 0; i < gc->ngpio; i++) in gpio_mockup_probe()
452 gc->ngpio); in gpio_mockup_probe()
460 rv = devm_gpiochip_add_data(dev, &chip->gc, chip); in gpio_mockup_probe()