Lines Matching defs:gc
119 * @gc: the target gpio_chip
123 bool of_gpio_need_valid_mask(const struct gpio_chip *gc)
126 struct device_node *np = gc->of_node;
805 * @gc: pointer to the gpio_chip structure
813 static int of_gpio_simple_xlate(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags)
821 if (gc->of_gpio_n_cells < 2) {
826 if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) {
830 if (gpiospec->args[0] >= gc->ngpio) {
864 struct gpio_chip *gc = &mm_gc->gc;
865 gc->label = kasprintf(GFP_KERNEL, "%pOF", np);
866 if (!gc->label) {
873 gc->base = -1;
877 of_node_put(mm_gc->gc.of_node);
878 mm_gc->gc.of_node = of_node_get(np);
879 ret = gpiochip_add_data(gc, data);
889 kfree(gc->label);
902 struct gpio_chip *gc = &mm_gc->gc;
908 gpiochip_remove(gc);
910 kfree(gc->label);
1062 void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev)
1065 if (gc->of_node) {
1066 gdev->dev.of_node = gc->of_node;
1068 gc->of_node = gdev->dev.of_node;