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()
237 int of_gpio_simple_xlate(struct gpio_chip *gc, in of_gpio_simple_xlate() argument
246 if (gc->of_gpio_n_cells < 2) { in of_gpio_simple_xlate()
251 if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) in of_gpio_simple_xlate()
254 if (gpiospec->args[0] >= gc->ngpio) in of_gpio_simple_xlate()
287 struct gpio_chip *gc = &mm_gc->gc; in of_mm_gpiochip_add() local
289 gc->label = kstrdup(np->full_name, GFP_KERNEL); in of_mm_gpiochip_add()
290 if (!gc->label) in of_mm_gpiochip_add()
297 gc->base = -1; in of_mm_gpiochip_add()
302 mm_gc->gc.of_node = np; in of_mm_gpiochip_add()
304 ret = gpiochip_add(gc); in of_mm_gpiochip_add()
312 kfree(gc->label); in of_mm_gpiochip_add()
326 struct gpio_chip *gc = &mm_gc->gc; in of_mm_gpiochip_remove() local
331 gpiochip_remove(gc); in of_mm_gpiochip_remove()
333 kfree(gc->label); in of_mm_gpiochip_remove()