Lines Matching refs:gc
61 brcmstb_gpio_gc_to_bank(struct gpio_chip *gc) in brcmstb_gpio_gc_to_bank() argument
63 struct bgpio_chip *bgc = to_bgpio_chip(gc); in brcmstb_gpio_gc_to_bank()
68 brcmstb_gpio_gc_to_priv(struct gpio_chip *gc) in brcmstb_gpio_gc_to_priv() argument
70 struct brcmstb_gpio_bank *bank = brcmstb_gpio_gc_to_bank(gc); in brcmstb_gpio_gc_to_priv()
97 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in brcmstb_gpio_irq_mask() local
98 struct brcmstb_gpio_bank *bank = brcmstb_gpio_gc_to_bank(gc); in brcmstb_gpio_irq_mask()
105 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in brcmstb_gpio_irq_unmask() local
106 struct brcmstb_gpio_bank *bank = brcmstb_gpio_gc_to_bank(gc); in brcmstb_gpio_irq_unmask()
113 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in brcmstb_gpio_irq_set_type() local
114 struct brcmstb_gpio_bank *bank = brcmstb_gpio_gc_to_bank(gc); in brcmstb_gpio_irq_set_type()
194 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in brcmstb_gpio_irq_set_wake() local
195 struct brcmstb_gpio_priv *priv = brcmstb_gpio_gc_to_priv(gc); in brcmstb_gpio_irq_set_wake()
213 struct irq_domain *irq_domain = bank->bgc.gc.irqdomain; in brcmstb_gpio_irq_bank_handler()
241 struct gpio_chip *gc = irq_desc_get_handler_data(desc); in brcmstb_gpio_irq_handler() local
242 struct brcmstb_gpio_priv *priv = brcmstb_gpio_gc_to_priv(gc); in brcmstb_gpio_irq_handler()
319 static int brcmstb_gpio_of_xlate(struct gpio_chip *gc, in brcmstb_gpio_of_xlate() argument
322 struct brcmstb_gpio_priv *priv = brcmstb_gpio_gc_to_priv(gc); in brcmstb_gpio_of_xlate()
323 struct brcmstb_gpio_bank *bank = brcmstb_gpio_gc_to_bank(gc); in brcmstb_gpio_of_xlate()
326 if (gc->of_gpio_n_cells != 2) { in brcmstb_gpio_of_xlate()
331 if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) in brcmstb_gpio_of_xlate()
334 offset = gpiospec->args[0] - (gc->base - priv->gpio_base); in brcmstb_gpio_of_xlate()
335 if (offset >= gc->ngpio || offset < 0) in brcmstb_gpio_of_xlate()
401 gpiochip_irqchip_add(&bank->bgc.gc, &bank->irq_chip, 0, in brcmstb_gpio_irq_setup()
403 gpiochip_set_chained_irqchip(&bank->bgc.gc, &bank->irq_chip, in brcmstb_gpio_irq_setup()
455 struct gpio_chip *gc; in brcmstb_gpio_probe() local
486 gc = &bgc->gc; in brcmstb_gpio_probe()
487 gc->of_node = np; in brcmstb_gpio_probe()
488 gc->owner = THIS_MODULE; in brcmstb_gpio_probe()
489 gc->label = np->full_name; in brcmstb_gpio_probe()
490 gc->base = gpio_base; in brcmstb_gpio_probe()
491 gc->of_gpio_n_cells = 2; in brcmstb_gpio_probe()
492 gc->of_xlate = brcmstb_gpio_of_xlate; in brcmstb_gpio_probe()
494 gc->ngpio = MAX_GPIO_PER_BANK; in brcmstb_gpio_probe()
502 err = gpiochip_add(gc); in brcmstb_gpio_probe()
508 gpio_base += gc->ngpio; in brcmstb_gpio_probe()
517 gc->base, gc->ngpio, bank->width); in brcmstb_gpio_probe()