Lines Matching refs:gc
38 static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, void *data) in of_gpiochip_find_and_xlate() argument
43 if ((gc->of_node != gg_data->gpiospec.np) || in of_gpiochip_find_and_xlate()
44 (gc->of_gpio_n_cells != gg_data->gpiospec.args_count) || in of_gpiochip_find_and_xlate()
45 (!gc->of_xlate)) in of_gpiochip_find_and_xlate()
48 ret = gc->of_xlate(gc, &gg_data->gpiospec, gg_data->flags); in of_gpiochip_find_and_xlate()
59 gg_data->out_gpio = gpiochip_get_desc(gc, ret); in of_gpiochip_find_and_xlate()
240 int of_gpio_simple_xlate(struct gpio_chip *gc, in of_gpio_simple_xlate() argument
249 if (gc->of_gpio_n_cells < 2) { in of_gpio_simple_xlate()
254 if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) in of_gpio_simple_xlate()
257 if (gpiospec->args[0] >= gc->ngpio) in of_gpio_simple_xlate()
290 struct gpio_chip *gc = &mm_gc->gc; in of_mm_gpiochip_add() local
292 gc->label = kstrdup(np->full_name, GFP_KERNEL); in of_mm_gpiochip_add()
293 if (!gc->label) in of_mm_gpiochip_add()
300 gc->base = -1; in of_mm_gpiochip_add()
305 mm_gc->gc.of_node = np; in of_mm_gpiochip_add()
307 ret = gpiochip_add(gc); in of_mm_gpiochip_add()
315 kfree(gc->label); in of_mm_gpiochip_add()
329 struct gpio_chip *gc = &mm_gc->gc; in of_mm_gpiochip_remove() local
334 gpiochip_remove(gc); in of_mm_gpiochip_remove()
336 kfree(gc->label); in of_mm_gpiochip_remove()