Lines Matching refs:gc
51 struct gpio_chip gc; member
57 struct ep93xx_gpio_chip gc[EP93XX_GPIO_CHIP_NUM]; member
60 #define to_ep93xx_gpio_chip(x) container_of(x, struct ep93xx_gpio_chip, gc)
62 static struct ep93xx_gpio_irq_chip *to_ep93xx_gpio_irq_chip(struct gpio_chip *gc) in to_ep93xx_gpio_irq_chip() argument
64 struct ep93xx_gpio_chip *egc = to_ep93xx_gpio_chip(gc); in to_ep93xx_gpio_irq_chip()
95 static void ep93xx_gpio_int_debounce(struct gpio_chip *gc, in ep93xx_gpio_int_debounce() argument
98 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_int_debounce()
99 struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); in ep93xx_gpio_int_debounce()
113 struct gpio_chip *gc = irq_desc_get_handler_data(desc); in ep93xx_gpio_ab_irq_handler() local
114 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_ab_irq_handler()
129 generic_handle_irq(irq_find_mapping(epg->gc[0].gc.irq.domain, in ep93xx_gpio_ab_irq_handler()
134 generic_handle_irq(irq_find_mapping(epg->gc[1].gc.irq.domain, in ep93xx_gpio_ab_irq_handler()
159 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in ep93xx_gpio_irq_ack() local
160 struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); in ep93xx_gpio_irq_ack()
161 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_irq_ack()
174 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in ep93xx_gpio_irq_mask_ack() local
175 struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); in ep93xx_gpio_irq_mask_ack()
176 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_irq_mask_ack()
190 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in ep93xx_gpio_irq_mask() local
191 struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); in ep93xx_gpio_irq_mask()
192 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_irq_mask()
200 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in ep93xx_gpio_irq_unmask() local
201 struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); in ep93xx_gpio_irq_unmask()
202 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_irq_unmask()
215 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in ep93xx_gpio_irq_type() local
216 struct ep93xx_gpio_irq_chip *eic = to_ep93xx_gpio_irq_chip(gc); in ep93xx_gpio_irq_type()
217 struct ep93xx_gpio *epg = gpiochip_get_data(gc); in ep93xx_gpio_irq_type()
222 gc->direction_input(gc, offset); in ep93xx_gpio_irq_type()
248 if (gc->get(gc, offset)) in ep93xx_gpio_irq_type()
307 static int ep93xx_gpio_set_config(struct gpio_chip *gc, unsigned offset, in ep93xx_gpio_set_config() argument
316 ep93xx_gpio_int_debounce(gc, offset, debounce ? true : false); in ep93xx_gpio_set_config()
321 static int ep93xx_gpio_f_to_irq(struct gpio_chip *gc, unsigned offset) in ep93xx_gpio_f_to_irq() argument
342 struct gpio_chip *gc = &egc->gc; in ep93xx_gpio_add_bank() local
347 err = bgpio_init(gc, dev, 1, data, NULL, NULL, dir, NULL, 0); in ep93xx_gpio_add_bank()
351 gc->label = bank->label; in ep93xx_gpio_add_bank()
352 gc->base = bank->base; in ep93xx_gpio_add_bank()
354 girq = &gc->irq; in ep93xx_gpio_add_bank()
358 gc->set_config = ep93xx_gpio_set_config; in ep93xx_gpio_add_bank()
410 irq_set_chip_data(gpio_irq, &epg->gc[5]); in ep93xx_gpio_add_bank()
418 gc->to_irq = ep93xx_gpio_f_to_irq; in ep93xx_gpio_add_bank()
421 return devm_gpiochip_add_data(dev, gc, epg); in ep93xx_gpio_add_bank()
438 struct ep93xx_gpio_chip *gc = &epg->gc[i]; in ep93xx_gpio_probe() local
441 if (ep93xx_gpio_add_bank(gc, pdev, epg, bank)) in ep93xx_gpio_probe()