Lines Matching refs:gc

60 	struct gpio_chip gc;  member
92 return container_of(chip, struct tb10x_gpio, gc); in to_tb10x_gpio()
199 tb10x_gpio->gc.label = of_node_full_name(dn); in tb10x_gpio_probe()
200 tb10x_gpio->gc.dev = &pdev->dev; in tb10x_gpio_probe()
201 tb10x_gpio->gc.owner = THIS_MODULE; in tb10x_gpio_probe()
202 tb10x_gpio->gc.direction_input = tb10x_gpio_direction_in; in tb10x_gpio_probe()
203 tb10x_gpio->gc.get = tb10x_gpio_get; in tb10x_gpio_probe()
204 tb10x_gpio->gc.direction_output = tb10x_gpio_direction_out; in tb10x_gpio_probe()
205 tb10x_gpio->gc.set = tb10x_gpio_set; in tb10x_gpio_probe()
206 tb10x_gpio->gc.request = gpiochip_generic_request; in tb10x_gpio_probe()
207 tb10x_gpio->gc.free = gpiochip_generic_free; in tb10x_gpio_probe()
208 tb10x_gpio->gc.base = -1; in tb10x_gpio_probe()
209 tb10x_gpio->gc.ngpio = ngpio; in tb10x_gpio_probe()
210 tb10x_gpio->gc.can_sleep = false; in tb10x_gpio_probe()
213 ret = gpiochip_add(&tb10x_gpio->gc); in tb10x_gpio_probe()
222 struct irq_chip_generic *gc; in tb10x_gpio_probe() local
230 tb10x_gpio->gc.to_irq = tb10x_gpio_to_irq; in tb10x_gpio_probe()
240 tb10x_gpio->gc.ngpio, in tb10x_gpio_probe()
248 tb10x_gpio->gc.ngpio, 1, tb10x_gpio->gc.label, in tb10x_gpio_probe()
254 gc = tb10x_gpio->domain->gc->gc[0]; in tb10x_gpio_probe()
255 gc->reg_base = tb10x_gpio->base; in tb10x_gpio_probe()
256 gc->chip_types[0].type = IRQ_TYPE_EDGE_BOTH; in tb10x_gpio_probe()
257 gc->chip_types[0].chip.irq_ack = irq_gc_ack_set_bit; in tb10x_gpio_probe()
258 gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit; in tb10x_gpio_probe()
259 gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit; in tb10x_gpio_probe()
260 gc->chip_types[0].chip.irq_set_type = tb10x_gpio_irq_set_type; in tb10x_gpio_probe()
261 gc->chip_types[0].regs.ack = OFFSET_TO_REG_CHANGE; in tb10x_gpio_probe()
262 gc->chip_types[0].regs.mask = OFFSET_TO_REG_INT_EN; in tb10x_gpio_probe()
270 gpiochip_remove(&tb10x_gpio->gc); in tb10x_gpio_probe()
280 if (tb10x_gpio->gc.to_irq) { in tb10x_gpio_remove()
281 irq_remove_generic_chip(tb10x_gpio->domain->gc->gc[0], in tb10x_gpio_remove()
282 BIT(tb10x_gpio->gc.ngpio) - 1, 0, 0); in tb10x_gpio_remove()
283 kfree(tb10x_gpio->domain->gc); in tb10x_gpio_remove()
286 gpiochip_remove(&tb10x_gpio->gc); in tb10x_gpio_remove()