Lines Matching refs:gc
82 struct gpio_chip gc; member
101 static void xway_stp_set(struct gpio_chip *gc, unsigned gpio, int val) in xway_stp_set() argument
104 container_of(gc, struct xway_stp, gc); in xway_stp_set()
122 static int xway_stp_dir_out(struct gpio_chip *gc, unsigned gpio, int val) in xway_stp_dir_out() argument
124 xway_stp_set(gc, gpio, val); in xway_stp_dir_out()
136 static int xway_stp_request(struct gpio_chip *gc, unsigned gpio) in xway_stp_request() argument
139 container_of(gc, struct xway_stp, gc); in xway_stp_request()
142 dev_err(gc->dev, "GPIO %d is driven by hardware\n", gpio); in xway_stp_request()
221 chip->gc.dev = &pdev->dev; in xway_stp_probe()
222 chip->gc.label = "stp-xway"; in xway_stp_probe()
223 chip->gc.direction_output = xway_stp_dir_out; in xway_stp_probe()
224 chip->gc.set = xway_stp_set; in xway_stp_probe()
225 chip->gc.request = xway_stp_request; in xway_stp_probe()
226 chip->gc.base = -1; in xway_stp_probe()
227 chip->gc.owner = THIS_MODULE; in xway_stp_probe()
240 chip->gc.ngpio = fls(chip->groups) * 8; in xway_stp_probe()
272 ret = gpiochip_add(&chip->gc); in xway_stp_probe()