Lines Matching refs:gc
45 struct gpio_chip gc; member
65 raw_spin_lock_irqsave(&gpio->gc.bgpio_lock, flags); in tb10x_set_bits()
72 raw_spin_unlock_irqrestore(&gpio->gc.bgpio_lock, flags); in tb10x_set_bits()
130 tb10x_gpio->gc.label = in tb10x_gpio_probe()
132 if (!tb10x_gpio->gc.label) in tb10x_gpio_probe()
140 ret = bgpio_init(&tb10x_gpio->gc, dev, 4, in tb10x_gpio_probe()
151 tb10x_gpio->gc.base = -1; in tb10x_gpio_probe()
152 tb10x_gpio->gc.parent = dev; in tb10x_gpio_probe()
153 tb10x_gpio->gc.owner = THIS_MODULE; in tb10x_gpio_probe()
158 tb10x_gpio->gc.ngpio = ngpio; in tb10x_gpio_probe()
159 tb10x_gpio->gc.request = gpiochip_generic_request; in tb10x_gpio_probe()
160 tb10x_gpio->gc.free = gpiochip_generic_free; in tb10x_gpio_probe()
162 ret = devm_gpiochip_add_data(dev, &tb10x_gpio->gc, tb10x_gpio); in tb10x_gpio_probe()
171 struct irq_chip_generic *gc; in tb10x_gpio_probe() local
177 tb10x_gpio->gc.to_irq = tb10x_gpio_to_irq; in tb10x_gpio_probe()
187 tb10x_gpio->gc.ngpio, in tb10x_gpio_probe()
194 tb10x_gpio->gc.ngpio, 1, tb10x_gpio->gc.label, in tb10x_gpio_probe()
200 gc = tb10x_gpio->domain->gc->gc[0]; in tb10x_gpio_probe()
201 gc->reg_base = tb10x_gpio->base; in tb10x_gpio_probe()
202 gc->chip_types[0].type = IRQ_TYPE_EDGE_BOTH; in tb10x_gpio_probe()
203 gc->chip_types[0].chip.irq_ack = irq_gc_ack_set_bit; in tb10x_gpio_probe()
204 gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit; in tb10x_gpio_probe()
205 gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit; in tb10x_gpio_probe()
206 gc->chip_types[0].chip.irq_set_type = tb10x_gpio_irq_set_type; in tb10x_gpio_probe()
207 gc->chip_types[0].regs.ack = OFFSET_TO_REG_CHANGE; in tb10x_gpio_probe()
208 gc->chip_types[0].regs.mask = OFFSET_TO_REG_INT_EN; in tb10x_gpio_probe()
218 if (tb10x_gpio->gc.to_irq) { in tb10x_gpio_remove()
219 irq_remove_generic_chip(tb10x_gpio->domain->gc->gc[0], in tb10x_gpio_remove()
220 BIT(tb10x_gpio->gc.ngpio) - 1, 0, 0); in tb10x_gpio_remove()
221 kfree(tb10x_gpio->domain->gc); in tb10x_gpio_remove()