Lines Matching refs:gc

60 	struct gpio_chip gc;  member
92 return container_of(chip, struct tb10x_gpio, gc); in to_tb10x_gpio()
209 tb10x_gpio->gc.label = of_node_full_name(dn); in tb10x_gpio_probe()
210 tb10x_gpio->gc.dev = &pdev->dev; in tb10x_gpio_probe()
211 tb10x_gpio->gc.owner = THIS_MODULE; in tb10x_gpio_probe()
212 tb10x_gpio->gc.direction_input = tb10x_gpio_direction_in; in tb10x_gpio_probe()
213 tb10x_gpio->gc.get = tb10x_gpio_get; in tb10x_gpio_probe()
214 tb10x_gpio->gc.direction_output = tb10x_gpio_direction_out; in tb10x_gpio_probe()
215 tb10x_gpio->gc.set = tb10x_gpio_set; in tb10x_gpio_probe()
216 tb10x_gpio->gc.request = tb10x_gpio_request; in tb10x_gpio_probe()
217 tb10x_gpio->gc.free = tb10x_gpio_free; in tb10x_gpio_probe()
218 tb10x_gpio->gc.base = -1; in tb10x_gpio_probe()
219 tb10x_gpio->gc.ngpio = ngpio; in tb10x_gpio_probe()
220 tb10x_gpio->gc.can_sleep = false; in tb10x_gpio_probe()
223 ret = gpiochip_add(&tb10x_gpio->gc); in tb10x_gpio_probe()
232 struct irq_chip_generic *gc; in tb10x_gpio_probe() local
240 tb10x_gpio->gc.to_irq = tb10x_gpio_to_irq; in tb10x_gpio_probe()
250 tb10x_gpio->gc.ngpio, in tb10x_gpio_probe()
258 tb10x_gpio->gc.ngpio, 1, tb10x_gpio->gc.label, in tb10x_gpio_probe()
264 gc = tb10x_gpio->domain->gc->gc[0]; in tb10x_gpio_probe()
265 gc->reg_base = tb10x_gpio->base; in tb10x_gpio_probe()
266 gc->chip_types[0].type = IRQ_TYPE_EDGE_BOTH; in tb10x_gpio_probe()
267 gc->chip_types[0].chip.irq_ack = irq_gc_ack_set_bit; in tb10x_gpio_probe()
268 gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit; in tb10x_gpio_probe()
269 gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit; in tb10x_gpio_probe()
270 gc->chip_types[0].chip.irq_set_type = tb10x_gpio_irq_set_type; in tb10x_gpio_probe()
271 gc->chip_types[0].regs.ack = OFFSET_TO_REG_CHANGE; in tb10x_gpio_probe()
272 gc->chip_types[0].regs.mask = OFFSET_TO_REG_INT_EN; in tb10x_gpio_probe()
280 gpiochip_remove(&tb10x_gpio->gc); in tb10x_gpio_probe()
290 if (tb10x_gpio->gc.to_irq) { in tb10x_gpio_remove()
291 irq_remove_generic_chip(tb10x_gpio->domain->gc->gc[0], in tb10x_gpio_remove()
292 BIT(tb10x_gpio->gc.ngpio) - 1, 0, 0); in tb10x_gpio_remove()
293 kfree(tb10x_gpio->domain->gc); in tb10x_gpio_remove()
297 gpiochip_remove(&tb10x_gpio->gc); in tb10x_gpio_remove()