Lines Matching refs:gc

49 	struct gpio_chip gc;  member
88 static int gpio_mockup_get(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_get() argument
90 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get()
100 static int gpio_mockup_get_multiple(struct gpio_chip *gc, in gpio_mockup_get_multiple() argument
103 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get_multiple()
107 for_each_set_bit(bit, mask, gc->ngpio) { in gpio_mockup_get_multiple()
122 static void gpio_mockup_set(struct gpio_chip *gc, in gpio_mockup_set() argument
125 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set()
132 static void gpio_mockup_set_multiple(struct gpio_chip *gc, in gpio_mockup_set_multiple() argument
135 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set_multiple()
139 for_each_set_bit(bit, mask, gc->ngpio) in gpio_mockup_set_multiple()
147 struct gpio_chip *gc = &chip->gc; in gpio_mockup_apply_pull() local
148 struct gpio_desc *desc = gpiochip_get_desc(gc, offset); in gpio_mockup_apply_pull()
192 static int gpio_mockup_set_config(struct gpio_chip *gc, in gpio_mockup_set_config() argument
195 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_set_config()
208 static int gpio_mockup_dirout(struct gpio_chip *gc, in gpio_mockup_dirout() argument
211 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_dirout()
221 static int gpio_mockup_dirin(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_dirin() argument
223 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_dirin()
232 static int gpio_mockup_get_direction(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_get_direction() argument
234 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_get_direction()
244 static int gpio_mockup_to_irq(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_to_irq() argument
246 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_to_irq()
251 static void gpio_mockup_free(struct gpio_chip *gc, unsigned int offset) in gpio_mockup_free() argument
253 struct gpio_mockup_chip *chip = gpiochip_get_data(gc); in gpio_mockup_free()
265 struct gpio_chip *gc; in gpio_mockup_debugfs_read() local
275 gc = &chip->gc; in gpio_mockup_debugfs_read()
277 val = gpio_mockup_get(gc, priv->offset); in gpio_mockup_debugfs_read()
348 struct gpio_chip *gc; in gpio_mockup_debugfs_setup() local
353 gc = &chip->gc; in gpio_mockup_debugfs_setup()
354 devname = dev_name(&gc->gpiodev->dev); in gpio_mockup_debugfs_setup()
358 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_debugfs_setup()
369 priv->desc = gpiochip_get_desc(gc, i); in gpio_mockup_debugfs_setup()
379 struct gpio_chip *gc = &chip->gc; in gpio_mockup_dispose_mappings() local
382 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_dispose_mappings()
392 struct gpio_chip *gc; in gpio_mockup_probe() local
418 gc = &chip->gc; in gpio_mockup_probe()
419 gc->base = base; in gpio_mockup_probe()
420 gc->ngpio = ngpio; in gpio_mockup_probe()
421 gc->label = name; in gpio_mockup_probe()
422 gc->owner = THIS_MODULE; in gpio_mockup_probe()
423 gc->parent = dev; in gpio_mockup_probe()
424 gc->get = gpio_mockup_get; in gpio_mockup_probe()
425 gc->set = gpio_mockup_set; in gpio_mockup_probe()
426 gc->get_multiple = gpio_mockup_get_multiple; in gpio_mockup_probe()
427 gc->set_multiple = gpio_mockup_set_multiple; in gpio_mockup_probe()
428 gc->direction_output = gpio_mockup_dirout; in gpio_mockup_probe()
429 gc->direction_input = gpio_mockup_dirin; in gpio_mockup_probe()
430 gc->get_direction = gpio_mockup_get_direction; in gpio_mockup_probe()
431 gc->set_config = gpio_mockup_set_config; in gpio_mockup_probe()
432 gc->to_irq = gpio_mockup_to_irq; in gpio_mockup_probe()
433 gc->free = gpio_mockup_free; in gpio_mockup_probe()
435 chip->lines = devm_kcalloc(dev, gc->ngpio, in gpio_mockup_probe()
440 for (i = 0; i < gc->ngpio; i++) in gpio_mockup_probe()
444 gc->ngpio); in gpio_mockup_probe()
452 rv = devm_gpiochip_add_data(dev, &chip->gc, chip); in gpio_mockup_probe()