Lines Matching refs:ngpio
169 #define NBANK(chip) DIV_ROUND_UP(chip->gpio_chip.ngpio, BANK_SZ)
218 return fls((chip->gpio_chip.ngpio - 1) / BANK_SZ); in pca953x_bank_shift()
521 bitmap_replace(bits, bits, reg_val, mask, gc->ngpio); in pca953x_gpio_get_multiple()
537 bitmap_replace(reg_val, reg_val, bits, mask, gc->ngpio); in pca953x_gpio_set_multiple()
616 gc->ngpio = gpios; in pca953x_setup_gpio()
675 bitmap_complement(irq_mask, chip->irq_mask, gc->ngpio); in pca953x_irq_bus_sync_unlock()
684 bitmap_or(irq_mask, chip->irq_trig_fall, chip->irq_trig_raise, gc->ngpio); in pca953x_irq_bus_sync_unlock()
685 bitmap_complement(reg_direction, reg_direction, gc->ngpio); in pca953x_irq_bus_sync_unlock()
686 bitmap_and(irq_mask, irq_mask, reg_direction, gc->ngpio); in pca953x_irq_bus_sync_unlock()
689 for_each_set_bit(level, irq_mask, gc->ngpio) in pca953x_irq_bus_sync_unlock()
745 bitmap_replace(new_stat, chip->irq_trig_fall, chip->irq_trig_raise, cur_stat, gc->ngpio); in pca953x_irq_pending()
747 bitmap_and(pending, new_stat, trigger, gc->ngpio); in pca953x_irq_pending()
749 return !bitmap_empty(pending, gc->ngpio); in pca953x_irq_pending()
759 bitmap_copy(old_stat, chip->irq_stat, gc->ngpio); in pca953x_irq_pending()
761 bitmap_and(new_stat, cur_stat, reg_direction, gc->ngpio); in pca953x_irq_pending()
762 bitmap_xor(cur_stat, new_stat, old_stat, gc->ngpio); in pca953x_irq_pending()
763 bitmap_and(trigger, cur_stat, chip->irq_mask, gc->ngpio); in pca953x_irq_pending()
765 if (bitmap_empty(trigger, gc->ngpio)) in pca953x_irq_pending()
768 bitmap_copy(chip->irq_stat, new_stat, gc->ngpio); in pca953x_irq_pending()
770 bitmap_and(cur_stat, chip->irq_trig_fall, old_stat, gc->ngpio); in pca953x_irq_pending()
771 bitmap_and(old_stat, chip->irq_trig_raise, new_stat, gc->ngpio); in pca953x_irq_pending()
772 bitmap_or(new_stat, old_stat, cur_stat, gc->ngpio); in pca953x_irq_pending()
773 bitmap_and(pending, new_stat, trigger, gc->ngpio); in pca953x_irq_pending()
775 return !bitmap_empty(pending, gc->ngpio); in pca953x_irq_pending()
795 for_each_set_bit(level, pending, gc->ngpio) { in pca953x_irq_handler()
845 bitmap_and(chip->irq_stat, irq_stat, reg_direction, chip->gpio_chip.ngpio); in pca953x_irq_setup()
1074 chip->gpio_chip.ngpio, pdata->context); in pca953x_probe()
1094 chip->gpio_chip.ngpio, pdata->context); in pca953x_remove()