Lines Matching refs:gc
54 struct gpio_chip gc; member
92 static int gpio_mockup_get(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_get() argument
94 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get()
103 static int gpio_mockup_get_multiple(struct gpio_chip *gc, in gpio_mockup_get_multiple() argument
106 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get_multiple()
110 for_each_set_bit(bit, mask, gc->ngpio) { in gpio_mockup_get_multiple()
125 static void gpio_mockup_set(struct gpio_chip *gc, in gpio_mockup_set() argument
128 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set()
135 static void gpio_mockup_set_multiple(struct gpio_chip *gc, in gpio_mockup_set_multiple() argument
138 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set_multiple()
143 for_each_set_bit(bit, mask, gc->ngpio) in gpio_mockup_set_multiple()
191 static int gpio_mockup_set_config(struct gpio_chip *gc, in gpio_mockup_set_config() argument
194 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set_config()
207 static int gpio_mockup_dirout(struct gpio_chip *gc, in gpio_mockup_dirout() argument
210 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_dirout()
220 static int gpio_mockup_dirin(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_dirin() argument
222 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_dirin()
230 static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_get_direction() argument
232 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get_direction()
241 static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_to_irq() argument
243 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_to_irq()
248 static int gpio_mockup_request(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_request() argument
250 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_request()
258 static void gpio_mockup_free(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_free() argument
260 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_free()
275 struct gpio_chip *gc; in gpio_mockup_debugfs_read() local
285 gc = &chip->gc; in gpio_mockup_debugfs_read()
287 val = gpio_mockup_get(gc, priv->offset); in gpio_mockup_debugfs_read()
357 struct gpio_chip *gc; in gpio_mockup_debugfs_setup() local
362 gc = &chip->gc; in gpio_mockup_debugfs_setup()
375 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_debugfs_setup()
402 struct gpio_chip *gc = &chip->gc; in gpio_mockup_dispose_mappings() local
405 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_dispose_mappings()
415 struct gpio_chip *gc; in gpio_mockup_probe() local
441 gc = &chip->gc; in gpio_mockup_probe()
442 gc->base = base; in gpio_mockup_probe()
443 gc->ngpio = ngpio; in gpio_mockup_probe()
444 gc->label = name; in gpio_mockup_probe()
445 gc->owner = THIS_MODULE; in gpio_mockup_probe()
446 gc->parent = dev; in gpio_mockup_probe()
447 gc->get = gpio_mockup_get; in gpio_mockup_probe()
448 gc->set = gpio_mockup_set; in gpio_mockup_probe()
449 gc->get_multiple = gpio_mockup_get_multiple; in gpio_mockup_probe()
450 gc->set_multiple = gpio_mockup_set_multiple; in gpio_mockup_probe()
451 gc->direction_output = gpio_mockup_dirout; in gpio_mockup_probe()
452 gc->direction_input = gpio_mockup_dirin; in gpio_mockup_probe()
453 gc->get_direction = gpio_mockup_get_direction; in gpio_mockup_probe()
454 gc->set_config = gpio_mockup_set_config; in gpio_mockup_probe()
455 gc->to_irq = gpio_mockup_to_irq; in gpio_mockup_probe()
456 gc->request = gpio_mockup_request; in gpio_mockup_probe()
457 gc->free = gpio_mockup_free; in gpio_mockup_probe()
459 chip->lines = devm_kcalloc(dev, gc->ngpio, in gpio_mockup_probe()
464 for (i = 0; i < gc->ngpio; i++) in gpio_mockup_probe()
468 gc->ngpio); in gpio_mockup_probe()
476 rv = devm_gpiochip_add_data(dev, &chip->gc, chip); in gpio_mockup_probe()