Lines Matching refs:gc
29 gpio_controller_register(struct gpio_controller *gc)
33 gc->gc_cells = OF_getpropint(gc->gc_node, "#gpio-cells", 2);
34 gc->gc_phandle = OF_getpropint(gc->gc_node, "phandle", 0);
35 if (gc->gc_phandle == 0)
38 LIST_INSERT_HEAD(&gpio_controllers, gc, gc_list);
41 for (child = OF_child(gc->gc_node); child; child = OF_peer(child)) {
74 gc->gc_config_pin(gc->gc_cookie, gpio, config);
76 gc->gc_set_pin(gc->gc_cookie, gpio, active);
77 gpio += gc->gc_cells;
87 struct gpio_controller *gc;
90 LIST_FOREACH(gc, &gpio_controllers, gc_list) {
91 if (gc->gc_phandle == phandle)
95 if (gc && gc->gc_config_pin)
96 gc->gc_config_pin(gc->gc_cookie, &cells[1], config);
102 struct gpio_controller *gc;
106 LIST_FOREACH(gc, &gpio_controllers, gc_list) {
107 if (gc->gc_phandle == phandle)
111 if (gc && gc->gc_get_pin)
112 val = gc->gc_get_pin(gc->gc_cookie, &cells[1]);
120 struct gpio_controller *gc;
123 LIST_FOREACH(gc, &gpio_controllers, gc_list) {
124 if (gc->gc_phandle == phandle)
128 if (gc && gc->gc_set_pin)
129 gc->gc_set_pin(gc->gc_cookie, &cells[1], val);
135 struct gpio_controller *gc;
138 LIST_FOREACH(gc, &gpio_controllers, gc_list)
139 if (gc->gc_phandle == phandle)
140 return cells + gc->gc_cells + 1;