Lines Matching refs:gc

41 static struct sh_pfc_chip *gpio_to_pfc_chip(struct gpio_chip *gc)  in gpio_to_pfc_chip()  argument
43 return container_of(gc, struct sh_pfc_chip, gpio_chip); in gpio_to_pfc_chip()
46 static struct sh_pfc *gpio_to_pfc(struct gpio_chip *gc) in gpio_to_pfc() argument
48 return gpio_to_pfc_chip(gc)->pfc; in gpio_to_pfc()
138 static int gpio_pin_request(struct gpio_chip *gc, unsigned offset) in gpio_pin_request() argument
140 struct sh_pfc *pfc = gpio_to_pfc(gc); in gpio_pin_request()
149 static void gpio_pin_free(struct gpio_chip *gc, unsigned offset) in gpio_pin_free() argument
173 static int gpio_pin_direction_input(struct gpio_chip *gc, unsigned offset) in gpio_pin_direction_input() argument
178 static int gpio_pin_direction_output(struct gpio_chip *gc, unsigned offset, in gpio_pin_direction_output() argument
181 gpio_pin_set_value(gpio_to_pfc_chip(gc), offset, value); in gpio_pin_direction_output()
186 static int gpio_pin_get(struct gpio_chip *gc, unsigned offset) in gpio_pin_get() argument
188 struct sh_pfc_chip *chip = gpio_to_pfc_chip(gc); in gpio_pin_get()
200 static void gpio_pin_set(struct gpio_chip *gc, unsigned offset, int value) in gpio_pin_set() argument
202 gpio_pin_set_value(gpio_to_pfc_chip(gc), offset, value); in gpio_pin_set()
205 static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset) in gpio_pin_to_irq() argument
207 struct sh_pfc *pfc = gpio_to_pfc(gc); in gpio_pin_to_irq()
231 struct gpio_chip *gc = &chip->gpio_chip; in gpio_pin_setup() local
243 gc->request = gpio_pin_request; in gpio_pin_setup()
244 gc->free = gpio_pin_free; in gpio_pin_setup()
245 gc->direction_input = gpio_pin_direction_input; in gpio_pin_setup()
246 gc->get = gpio_pin_get; in gpio_pin_setup()
247 gc->direction_output = gpio_pin_direction_output; in gpio_pin_setup()
248 gc->set = gpio_pin_set; in gpio_pin_setup()
249 gc->to_irq = gpio_pin_to_irq; in gpio_pin_setup()
251 gc->label = pfc->info->name; in gpio_pin_setup()
252 gc->dev = pfc->dev; in gpio_pin_setup()
253 gc->owner = THIS_MODULE; in gpio_pin_setup()
254 gc->base = 0; in gpio_pin_setup()
255 gc->ngpio = pfc->nr_gpio_pins; in gpio_pin_setup()
264 static int gpio_function_request(struct gpio_chip *gc, unsigned offset) in gpio_function_request() argument
267 struct sh_pfc *pfc = gpio_to_pfc(gc); in gpio_function_request()
289 static void gpio_function_free(struct gpio_chip *gc, unsigned offset) in gpio_function_free() argument
296 struct gpio_chip *gc = &chip->gpio_chip; in gpio_function_setup() local
298 gc->request = gpio_function_request; in gpio_function_setup()
299 gc->free = gpio_function_free; in gpio_function_setup()
301 gc->label = pfc->info->name; in gpio_function_setup()
302 gc->owner = THIS_MODULE; in gpio_function_setup()
303 gc->base = pfc->nr_gpio_pins; in gpio_function_setup()
304 gc->ngpio = pfc->info->nr_func_gpios; in gpio_function_setup()