Lines Matching refs:gc
24 static int ls1x_gpio_request(struct gpio_chip *gc, unsigned int offset) in ls1x_gpio_request() argument
28 raw_spin_lock_irqsave(&gc->bgpio_lock, flags); in ls1x_gpio_request()
31 raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags); in ls1x_gpio_request()
36 static void ls1x_gpio_free(struct gpio_chip *gc, unsigned int offset) in ls1x_gpio_free() argument
40 raw_spin_lock_irqsave(&gc->bgpio_lock, flags); in ls1x_gpio_free()
43 raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags); in ls1x_gpio_free()
49 struct gpio_chip *gc; in ls1x_gpio_probe() local
52 gc = devm_kzalloc(dev, sizeof(*gc), GFP_KERNEL); in ls1x_gpio_probe()
53 if (!gc) in ls1x_gpio_probe()
60 ret = bgpio_init(gc, dev, 4, gpio_reg_base + GPIO_DATA, in ls1x_gpio_probe()
66 gc->owner = THIS_MODULE; in ls1x_gpio_probe()
67 gc->request = ls1x_gpio_request; in ls1x_gpio_probe()
68 gc->free = ls1x_gpio_free; in ls1x_gpio_probe()
69 gc->base = pdev->id * 32; in ls1x_gpio_probe()
71 ret = devm_gpiochip_add_data(dev, gc, NULL); in ls1x_gpio_probe()
75 platform_set_drvdata(pdev, gc); in ls1x_gpio_probe()