Lines Matching refs:gc
41 struct gpio_chip gc; member
100 static void mcu_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) in mcu_gpio_set() argument
102 struct mcu *mcu = container_of(gc, struct mcu, gc); in mcu_gpio_set()
115 static int mcu_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) in mcu_gpio_dir_out() argument
117 mcu_gpio_set(gc, gpio, val); in mcu_gpio_dir_out()
124 struct gpio_chip *gc = &mcu->gc; in mcu_gpiochip_add() local
130 gc->owner = THIS_MODULE; in mcu_gpiochip_add()
131 gc->label = np->full_name; in mcu_gpiochip_add()
132 gc->can_sleep = 1; in mcu_gpiochip_add()
133 gc->ngpio = MCU_NUM_GPIO; in mcu_gpiochip_add()
134 gc->base = -1; in mcu_gpiochip_add()
135 gc->set = mcu_gpio_set; in mcu_gpiochip_add()
136 gc->direction_output = mcu_gpio_dir_out; in mcu_gpiochip_add()
137 gc->of_node = np; in mcu_gpiochip_add()
139 return gpiochip_add(gc); in mcu_gpiochip_add()
144 gpiochip_remove(&mcu->gc); in mcu_gpiochip_remove()