Lines Matching refs:gc

14 	struct gpio_chip gc;  member
23 #define to_gpio_reg(x) container_of(x, struct gpio_reg, gc)
25 static int gpio_reg_get_direction(struct gpio_chip *gc, unsigned offset) in gpio_reg_get_direction() argument
27 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_get_direction()
33 static int gpio_reg_direction_output(struct gpio_chip *gc, unsigned offset, in gpio_reg_direction_output() argument
36 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_direction_output()
41 gc->set(gc, offset, value); in gpio_reg_direction_output()
45 static int gpio_reg_direction_input(struct gpio_chip *gc, unsigned offset) in gpio_reg_direction_input() argument
47 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_direction_input()
52 static void gpio_reg_set(struct gpio_chip *gc, unsigned offset, int value) in gpio_reg_set() argument
54 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_set()
69 static int gpio_reg_get(struct gpio_chip *gc, unsigned offset) in gpio_reg_get() argument
71 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_get()
87 static void gpio_reg_set_multiple(struct gpio_chip *gc, unsigned long *mask, in gpio_reg_set_multiple() argument
90 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_set_multiple()
99 static int gpio_reg_to_irq(struct gpio_chip *gc, unsigned offset) in gpio_reg_to_irq() argument
101 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_to_irq()
148 r->gc.label = label; in gpio_reg_init()
149 r->gc.get_direction = gpio_reg_get_direction; in gpio_reg_init()
150 r->gc.direction_input = gpio_reg_direction_input; in gpio_reg_init()
151 r->gc.direction_output = gpio_reg_direction_output; in gpio_reg_init()
152 r->gc.set = gpio_reg_set; in gpio_reg_init()
153 r->gc.get = gpio_reg_get; in gpio_reg_init()
154 r->gc.set_multiple = gpio_reg_set_multiple; in gpio_reg_init()
156 r->gc.to_irq = gpio_reg_to_irq; in gpio_reg_init()
157 r->gc.base = base; in gpio_reg_init()
158 r->gc.ngpio = num; in gpio_reg_init()
159 r->gc.names = names; in gpio_reg_init()
166 ret = devm_gpiochip_add_data(dev, &r->gc, r); in gpio_reg_init()
168 ret = gpiochip_add_data(&r->gc, r); in gpio_reg_init()
170 return ret ? ERR_PTR(ret) : &r->gc; in gpio_reg_init()
173 int gpio_reg_resume(struct gpio_chip *gc) in gpio_reg_resume() argument
175 struct gpio_reg *r = to_gpio_reg(gc); in gpio_reg_resume()