Lines Matching defs:gc
17 static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off)
20 gpio = container_of(gc, struct ucb1400_gpio, gc);
25 static int ucb1400_gpio_dir_out(struct gpio_chip *gc, unsigned off, int val)
28 gpio = container_of(gc, struct ucb1400_gpio, gc);
34 static int ucb1400_gpio_get(struct gpio_chip *gc, unsigned off)
37 gpio = container_of(gc, struct ucb1400_gpio, gc);
41 static void ucb1400_gpio_set(struct gpio_chip *gc, unsigned off, int val)
44 gpio = container_of(gc, struct ucb1400_gpio, gc);
60 ucb->gc.label = "ucb1400_gpio";
61 ucb->gc.base = ucbdata->gpio_offset;
62 ucb->gc.ngpio = 10;
63 ucb->gc.owner = THIS_MODULE;
65 ucb->gc.direction_input = ucb1400_gpio_dir_in;
66 ucb->gc.direction_output = ucb1400_gpio_dir_out;
67 ucb->gc.get = ucb1400_gpio_get;
68 ucb->gc.set = ucb1400_gpio_set;
69 ucb->gc.can_sleep = 1;
71 err = gpiochip_add(&ucb->gc);
76 err = ucbdata->gpio_setup(&dev->dev, ucb->gc.ngpio);
89 err = ucbdata->gpio_teardown(&dev->dev, ucb->gc.ngpio);
94 err = gpiochip_remove(&ucb->gc);