Lines Matching refs:gc
36 struct gpio_chip gc; member
41 static int mb86s70_gpio_request(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_request() argument
43 struct mb86s70_gpio_chip *gchip = gpiochip_get_data(gc); in mb86s70_gpio_request()
58 static void mb86s70_gpio_free(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_free() argument
60 struct mb86s70_gpio_chip *gchip = gpiochip_get_data(gc); in mb86s70_gpio_free()
73 static int mb86s70_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_direction_input() argument
75 struct mb86s70_gpio_chip *gchip = gpiochip_get_data(gc); in mb86s70_gpio_direction_input()
90 static int mb86s70_gpio_direction_output(struct gpio_chip *gc, in mb86s70_gpio_direction_output() argument
93 struct mb86s70_gpio_chip *gchip = gpiochip_get_data(gc); in mb86s70_gpio_direction_output()
115 static int mb86s70_gpio_get(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_get() argument
117 struct mb86s70_gpio_chip *gchip = gpiochip_get_data(gc); in mb86s70_gpio_get()
122 static void mb86s70_gpio_set(struct gpio_chip *gc, unsigned gpio, int value) in mb86s70_gpio_set() argument
124 struct mb86s70_gpio_chip *gchip = gpiochip_get_data(gc); in mb86s70_gpio_set()
140 static int mb86s70_gpio_to_irq(struct gpio_chip *gc, unsigned int offset) in mb86s70_gpio_to_irq() argument
145 irq = platform_get_irq(to_platform_device(gc->parent), index); in mb86s70_gpio_to_irq()
178 gchip->gc.direction_output = mb86s70_gpio_direction_output; in mb86s70_gpio_probe()
179 gchip->gc.direction_input = mb86s70_gpio_direction_input; in mb86s70_gpio_probe()
180 gchip->gc.request = mb86s70_gpio_request; in mb86s70_gpio_probe()
181 gchip->gc.free = mb86s70_gpio_free; in mb86s70_gpio_probe()
182 gchip->gc.get = mb86s70_gpio_get; in mb86s70_gpio_probe()
183 gchip->gc.set = mb86s70_gpio_set; in mb86s70_gpio_probe()
184 gchip->gc.to_irq = mb86s70_gpio_to_irq; in mb86s70_gpio_probe()
185 gchip->gc.label = dev_name(&pdev->dev); in mb86s70_gpio_probe()
186 gchip->gc.ngpio = 32; in mb86s70_gpio_probe()
187 gchip->gc.owner = THIS_MODULE; in mb86s70_gpio_probe()
188 gchip->gc.parent = &pdev->dev; in mb86s70_gpio_probe()
189 gchip->gc.base = -1; in mb86s70_gpio_probe()
191 ret = gpiochip_add_data(&gchip->gc, gchip); in mb86s70_gpio_probe()
196 acpi_gpiochip_request_interrupts(&gchip->gc); in mb86s70_gpio_probe()
205 acpi_gpiochip_free_interrupts(&gchip->gc); in mb86s70_gpio_remove()
206 gpiochip_remove(&gchip->gc); in mb86s70_gpio_remove()