Lines Matching refs:cpm1_gc

391 	struct cpm1_gpio16_chip *cpm1_gc =  in cpm1_gpio16_save_regs()  local
395 cpm1_gc->cpdata = in_be16(&iop->dat); in cpm1_gpio16_save_regs()
412 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in __cpm1_gpio16_set() local
416 cpm1_gc->cpdata |= pin_mask; in __cpm1_gpio16_set()
418 cpm1_gc->cpdata &= ~pin_mask; in __cpm1_gpio16_set()
420 out_be16(&iop->dat, cpm1_gc->cpdata); in __cpm1_gpio16_set()
426 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_set() local
430 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio16_set()
434 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio16_set()
440 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_to_irq() local
442 return cpm1_gc->irq[gpio] ? : -ENXIO; in cpm1_gpio16_to_irq()
448 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_dir_out() local
453 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_out()
458 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_out()
466 struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio16_dir_in() local
471 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_in()
475 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio16_dir_in()
483 struct cpm1_gpio16_chip *cpm1_gc; in cpm1_gpiochip_add16() local
488 cpm1_gc = kzalloc(sizeof(*cpm1_gc), GFP_KERNEL); in cpm1_gpiochip_add16()
489 if (!cpm1_gc) in cpm1_gpiochip_add16()
492 spin_lock_init(&cpm1_gc->lock); in cpm1_gpiochip_add16()
499 cpm1_gc->irq[i] = irq_of_parse_and_map(np, j++); in cpm1_gpiochip_add16()
502 mm_gc = &cpm1_gc->mm_gc; in cpm1_gpiochip_add16()
515 return of_mm_gpiochip_add_data(np, mm_gc, cpm1_gc); in cpm1_gpiochip_add16()
528 struct cpm1_gpio32_chip *cpm1_gc = in cpm1_gpio32_save_regs() local
532 cpm1_gc->cpdata = in_be32(&iop->dat); in cpm1_gpio32_save_regs()
549 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in __cpm1_gpio32_set() local
553 cpm1_gc->cpdata |= pin_mask; in __cpm1_gpio32_set()
555 cpm1_gc->cpdata &= ~pin_mask; in __cpm1_gpio32_set()
557 out_be32(&iop->dat, cpm1_gc->cpdata); in __cpm1_gpio32_set()
563 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio32_set() local
567 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio32_set()
571 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio32_set()
577 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio32_dir_out() local
582 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_out()
587 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_out()
595 struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc); in cpm1_gpio32_dir_in() local
600 spin_lock_irqsave(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_in()
604 spin_unlock_irqrestore(&cpm1_gc->lock, flags); in cpm1_gpio32_dir_in()
612 struct cpm1_gpio32_chip *cpm1_gc; in cpm1_gpiochip_add32() local
616 cpm1_gc = kzalloc(sizeof(*cpm1_gc), GFP_KERNEL); in cpm1_gpiochip_add32()
617 if (!cpm1_gc) in cpm1_gpiochip_add32()
620 spin_lock_init(&cpm1_gc->lock); in cpm1_gpiochip_add32()
622 mm_gc = &cpm1_gc->mm_gc; in cpm1_gpiochip_add32()
634 return of_mm_gpiochip_add_data(np, mm_gc, cpm1_gc); in cpm1_gpiochip_add32()