Lines Matching refs:cpm1_gc
542 struct cpm1_gpio16_chip *cpm1_gc = in cpm1_gpio16_save_regs() local
546 cpm1_gc->cpdata = in_be16(&iop->dat); in cpm1_gpio16_save_regs()
563 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in __cpm1_gpio16_set() local
567 cpm1_gc->cpdata |= pin_mask; in __cpm1_gpio16_set()
569 cpm1_gc->cpdata &= ~pin_mask; in __cpm1_gpio16_set()
571 out_be16(&iop->dat, cpm1_gc->cpdata); in __cpm1_gpio16_set()
577 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_set() local
581 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio16_set()
585 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio16_set()
591 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_to_irq() local
593 return cpm1_gc->irq[gpio] ? : -ENXIO; in cpm1_gpio16_to_irq()
599 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_dir_out() local
604 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_out()
609 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_out()
617 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_dir_in() local
622 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_in()
626 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_in()
634 struct cpm1_gpio16_chip *cpm1_gc; in cpm1_gpiochip_add16() local
639 cpm1_gc = kzalloc(sizeof(*cpm1_gc), GFP_KERNEL); in cpm1_gpiochip_add16()
640 if (!cpm1_gc) in cpm1_gpiochip_add16()
643 spin_lock_init(&cpm1_gc->lock); in cpm1_gpiochip_add16()
650 cpm1_gc->irq[i] = irq_of_parse_and_map(np, j++); in cpm1_gpiochip_add16()
653 mm_gc = &cpm1_gc->mm_gc; in cpm1_gpiochip_add16()
666 return of_mm_gpiochip_add_data(np, mm_gc, cpm1_gc); in cpm1_gpiochip_add16()
679 struct cpm1_gpio32_chip *cpm1_gc = in cpm1_gpio32_save_regs() local
683 cpm1_gc->cpdata = in_be32(&iop->dat); in cpm1_gpio32_save_regs()
700 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in __cpm1_gpio32_set() local
704 cpm1_gc->cpdata |= pin_mask; in __cpm1_gpio32_set()
706 cpm1_gc->cpdata &= ~pin_mask; in __cpm1_gpio32_set()
708 out_be32(&iop->dat, cpm1_gc->cpdata); in __cpm1_gpio32_set()
714 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio32_set() local
718 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio32_set()
722 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio32_set()
728 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio32_dir_out() local
733 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_out()
738 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_out()
746 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio32_dir_in() local
751 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_in()
755 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_in()
763 struct cpm1_gpio32_chip *cpm1_gc; in cpm1_gpiochip_add32() local
767 cpm1_gc = kzalloc(sizeof(*cpm1_gc), GFP_KERNEL); in cpm1_gpiochip_add32()
768 if (!cpm1_gc) in cpm1_gpiochip_add32()
771 spin_lock_init(&cpm1_gc->lock); in cpm1_gpiochip_add32()
773 mm_gc = &cpm1_gc->mm_gc; in cpm1_gpiochip_add32()
785 return of_mm_gpiochip_add_data(np, mm_gc, cpm1_gc); in cpm1_gpiochip_add32()