Lines Matching refs:gc

54 	struct gpio_chip	gc;  member
61 static int pl061_direction_input(struct gpio_chip *gc, unsigned offset) in pl061_direction_input() argument
63 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_direction_input()
67 if (offset >= gc->ngpio) in pl061_direction_input()
79 static int pl061_direction_output(struct gpio_chip *gc, unsigned offset, in pl061_direction_output() argument
82 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_direction_output()
86 if (offset >= gc->ngpio) in pl061_direction_output()
105 static int pl061_get_value(struct gpio_chip *gc, unsigned offset) in pl061_get_value() argument
107 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_get_value()
112 static void pl061_set_value(struct gpio_chip *gc, unsigned offset, int value) in pl061_set_value() argument
114 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_set_value()
121 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in pl061_irq_type() local
122 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_irq_type()
134 dev_err(gc->dev, in pl061_irq_type()
161 dev_dbg(gc->dev, "line %d: IRQ on %s level\n", in pl061_irq_type()
170 dev_dbg(gc->dev, "line %d: IRQ on both edges\n", offset); in pl061_irq_type()
185 dev_dbg(gc->dev, "line %d: IRQ on %s edge\n", in pl061_irq_type()
194 dev_warn(gc->dev, "no trigger selected for line %d\n", in pl061_irq_type()
211 struct gpio_chip *gc = irq_desc_get_handler_data(desc); in pl061_irq_handler() local
212 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_irq_handler()
220 generic_handle_irq(irq_find_mapping(gc->irqdomain, in pl061_irq_handler()
229 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in pl061_irq_mask() local
230 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_irq_mask()
242 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in pl061_irq_unmask() local
243 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_irq_unmask()
263 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); in pl061_irq_ack() local
264 struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc); in pl061_irq_ack()
292 chip->gc.base = pdata->gpio_base; in pl061_probe()
299 chip->gc.base = -1; in pl061_probe()
309 chip->gc.request = gpiochip_generic_request; in pl061_probe()
310 chip->gc.free = gpiochip_generic_free; in pl061_probe()
313 chip->gc.direction_input = pl061_direction_input; in pl061_probe()
314 chip->gc.direction_output = pl061_direction_output; in pl061_probe()
315 chip->gc.get = pl061_get_value; in pl061_probe()
316 chip->gc.set = pl061_set_value; in pl061_probe()
317 chip->gc.ngpio = PL061_GPIO_NR; in pl061_probe()
318 chip->gc.label = dev_name(dev); in pl061_probe()
319 chip->gc.dev = dev; in pl061_probe()
320 chip->gc.owner = THIS_MODULE; in pl061_probe()
322 ret = gpiochip_add(&chip->gc); in pl061_probe()
336 ret = gpiochip_irqchip_add(&chip->gc, &pl061_irqchip, in pl061_probe()
343 gpiochip_set_chained_irqchip(&chip->gc, &pl061_irqchip, in pl061_probe()
349 pl061_direction_output(&chip->gc, i, in pl061_probe()
352 pl061_direction_input(&chip->gc, i); in pl061_probe()
379 pl061_get_value(&chip->gc, offset) << offset; in pl061_suspend()
392 pl061_direction_output(&chip->gc, offset, in pl061_resume()
396 pl061_direction_input(&chip->gc, offset); in pl061_resume()