Lines Matching refs:ngpio
125 static int gpiochip_find_base(int ngpio)
137 if (spare == ngpio) {
144 i -= chip->ngpio - 1;
156 * @ngpio: number of gpios to reserve
164 int __init gpiochip_reserve(int start, int ngpio)
170 if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio - 1))
175 for (i = start; i < start + ngpio; i++) {
187 __func__, start, start + ngpio - 1);
562 * /ngpio ... matching gpio_chip.ngpio
588 return sprintf(buf, "%u\n", chip->ngpio);
590 static DEVICE_ATTR(ngpio, 0444, chip_ngpio_show, NULL);
1042 if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio - 1))
1051 base = gpiochip_find_base(chip->ngpio);
1060 for (id = base; id < base + chip->ngpio; id++) {
1067 for (id = base; id < base + chip->ngpio; id++) {
1098 chip->base, chip->base + chip->ngpio - 1,
1120 for (id = chip->base; id < chip->base + chip->ngpio; id++) {
1127 for (id = chip->base; id < chip->base + chip->ngpio; id++)
1330 * @offset: of signal within controller's 0..(ngpio - 1) range
1381 if (gpio >= chip->ngpio)
1434 if (gpio >= chip->ngpio)
1492 if (gpio >= chip->ngpio)
1649 for (i = 0; i < chip->ngpio; i++, gpio++, gdesc++) {
1728 chip->base, chip->base + chip->ngpio - 1);