Lines Matching refs:ngpio
50 #define GPIO_OFFSET_VALID(chip, offset) (offset >= 0 && offset < chip->ngpio)
77 if (chip->base <= gpio && chip->base + chip->ngpio > gpio) { in gpio_to_desc()
98 if (hwnum >= chip->ngpio) in gpiochip_get_desc()
127 static int gpiochip_find_base(int ngpio) in gpiochip_find_base() argument
130 int base = ARCH_NR_GPIOS - ngpio; in gpiochip_find_base()
134 if (chip->base + chip->ngpio <= base) in gpiochip_find_base()
138 base = chip->base - ngpio; in gpiochip_find_base()
201 if (_chip->base >= chip->base + chip->ngpio) in gpiochip_add_to_list()
208 if (_chip->base + _chip->ngpio > chip->base) { in gpiochip_add_to_list()
246 descs = kcalloc(chip->ngpio, sizeof(descs[0]), GFP_KERNEL); in gpiochip_add()
253 base = gpiochip_find_base(chip->ngpio); in gpiochip_add()
268 for (id = 0; id < chip->ngpio; id++) { in gpiochip_add()
298 chip->base, chip->base + chip->ngpio - 1, in gpiochip_add()
316 chip->base, chip->base + chip->ngpio - 1, in gpiochip_add()
343 for (id = 0; id < chip->ngpio; id++) { in gpiochip_remove()
347 for (id = 0; id < chip->ngpio; id++) in gpiochip_remove()
447 for (offset = 0; offset < gpiochip->ngpio; offset++) in gpiochip_set_chained_irqchip()
554 for (offset = 0; offset < gpiochip->ngpio; offset++) in gpiochip_irqchip_remove()
622 gpiochip->ngpio, first_irq, in gpiochip_irqchip_add()
636 for (offset = 0; offset < gpiochip->ngpio; offset++) { in gpiochip_irqchip_add()
1295 for (i = 0; i < chip->ngpio; i++) { in gpio_chip_set_multiple()
1319 unsigned long mask[BITS_TO_LONGS(chip->ngpio)]; in gpiod_set_array_priv()
1320 unsigned long bits[BITS_TO_LONGS(chip->ngpio)]; in gpiod_set_array_priv()
1490 if (offset >= chip->ngpio) in gpiochip_lock_as_irq()
1515 if (offset >= chip->ngpio) in gpiochip_unlock_as_irq()
1795 if (chip->ngpio <= p->chip_hwnum) { in gpiod_find()
1798 idx, chip->ngpio, chip->label); in gpiod_find()
2154 for (id = 0; id < chip->ngpio; id++) { in gpiochip_free_hogs()
2263 for (i = 0; i < chip->ngpio; i++, gpio++, gdesc++) { in gpiolib_dbg_show()
2329 chip->base, chip->base + chip->ngpio - 1); in gpiolib_seq_show()