Lines Matching refs:mgr

173 		dao->mgr->imap_add(dao->mgr, entry);  in dao_set_left_input()
202 dao->mgr->imap_add(dao->mgr, entry); in dao_set_right_input()
224 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_left_input()
228 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_left_input()
248 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_right_input()
252 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_right_input()
387 struct daio_mgr *mgr) in dao_rsc_init() argument
389 struct hw *hw = mgr->mgr.hw; in dao_rsc_init()
393 err = daio_rsc_init(&dao->daio, desc, mgr->mgr.hw); in dao_rsc_init()
404 dao->mgr = mgr; in dao_rsc_init()
410 hw->daio_mgr_dsb_dao(mgr->mgr.ctrl_blk, in dao_rsc_init()
412 hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); in dao_rsc_init()
415 hw->daio_mgr_dao_init(mgr->mgr.ctrl_blk, in dao_rsc_init()
417 hw->daio_mgr_enb_dao(mgr->mgr.ctrl_blk, in dao_rsc_init()
419 hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); in dao_rsc_init()
452 struct daio_mgr *mgr = dao->mgr; in dao_rsc_reinit() local
459 return dao_rsc_init(dao, &dsc, mgr); in dao_rsc_reinit()
464 struct daio_mgr *mgr) in dai_rsc_init() argument
467 struct hw *hw = mgr->mgr.hw; in dai_rsc_init()
470 err = daio_rsc_init(&dai->daio, desc, mgr->mgr.hw); in dai_rsc_init()
475 dai->hw = mgr->mgr.hw; in dai_rsc_init()
506 static int daio_mgr_get_rsc(struct rsc_mgr *mgr, enum DAIOTYP type) in daio_mgr_get_rsc() argument
508 if (((struct daio_usage *)mgr->rscs)->data & (0x1 << type)) in daio_mgr_get_rsc()
511 ((struct daio_usage *)mgr->rscs)->data |= (0x1 << type); in daio_mgr_get_rsc()
516 static int daio_mgr_put_rsc(struct rsc_mgr *mgr, enum DAIOTYP type) in daio_mgr_put_rsc() argument
518 ((struct daio_usage *)mgr->rscs)->data &= ~(0x1 << type); in daio_mgr_put_rsc()
523 static int get_daio_rsc(struct daio_mgr *mgr, in get_daio_rsc() argument
533 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_daio_rsc()
534 err = daio_mgr_get_rsc(&mgr->mgr, desc->type); in get_daio_rsc()
535 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_daio_rsc()
537 dev_err(mgr->card->dev, in get_daio_rsc()
549 err = dao_rsc_init(dao, desc, mgr); in get_daio_rsc()
561 err = dai_rsc_init(dai, desc, mgr); in get_daio_rsc()
570 mgr->daio_enable(mgr, *rdaio); in get_daio_rsc()
571 mgr->commit_write(mgr); in get_daio_rsc()
576 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_daio_rsc()
577 daio_mgr_put_rsc(&mgr->mgr, desc->type); in get_daio_rsc()
578 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_daio_rsc()
582 static int put_daio_rsc(struct daio_mgr *mgr, struct daio *daio) in put_daio_rsc() argument
586 mgr->daio_disable(mgr, daio); in put_daio_rsc()
587 mgr->commit_write(mgr); in put_daio_rsc()
589 spin_lock_irqsave(&mgr->mgr_lock, flags); in put_daio_rsc()
590 daio_mgr_put_rsc(&mgr->mgr, daio->type); in put_daio_rsc()
591 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in put_daio_rsc()
604 static int daio_mgr_enb_daio(struct daio_mgr *mgr, struct daio *daio) in daio_mgr_enb_daio() argument
606 struct hw *hw = mgr->mgr.hw; in daio_mgr_enb_daio()
609 hw->daio_mgr_enb_dao(mgr->mgr.ctrl_blk, in daio_mgr_enb_daio()
612 hw->daio_mgr_enb_dai(mgr->mgr.ctrl_blk, in daio_mgr_enb_daio()
618 static int daio_mgr_dsb_daio(struct daio_mgr *mgr, struct daio *daio) in daio_mgr_dsb_daio() argument
620 struct hw *hw = mgr->mgr.hw; in daio_mgr_dsb_daio()
623 hw->daio_mgr_dsb_dao(mgr->mgr.ctrl_blk, in daio_mgr_dsb_daio()
626 hw->daio_mgr_dsb_dai(mgr->mgr.ctrl_blk, in daio_mgr_dsb_daio()
634 struct rsc_mgr *mgr = &((struct daio_mgr *)data)->mgr; in daio_map_op() local
635 struct hw *hw = mgr->hw; in daio_map_op()
637 hw->daio_mgr_set_imaparc(mgr->ctrl_blk, entry->slot); in daio_map_op()
638 hw->daio_mgr_set_imapnxt(mgr->ctrl_blk, entry->next); in daio_map_op()
639 hw->daio_mgr_set_imapaddr(mgr->ctrl_blk, entry->addr); in daio_map_op()
640 hw->daio_mgr_commit_write(mgr->hw, mgr->ctrl_blk); in daio_map_op()
645 static int daio_imap_add(struct daio_mgr *mgr, struct imapper *entry) in daio_imap_add() argument
650 spin_lock_irqsave(&mgr->imap_lock, flags); in daio_imap_add()
651 if (!entry->addr && mgr->init_imap_added) { in daio_imap_add()
652 input_mapper_delete(&mgr->imappers, mgr->init_imap, in daio_imap_add()
653 daio_map_op, mgr); in daio_imap_add()
654 mgr->init_imap_added = 0; in daio_imap_add()
656 err = input_mapper_add(&mgr->imappers, entry, daio_map_op, mgr); in daio_imap_add()
657 spin_unlock_irqrestore(&mgr->imap_lock, flags); in daio_imap_add()
662 static int daio_imap_delete(struct daio_mgr *mgr, struct imapper *entry) in daio_imap_delete() argument
667 spin_lock_irqsave(&mgr->imap_lock, flags); in daio_imap_delete()
668 err = input_mapper_delete(&mgr->imappers, entry, daio_map_op, mgr); in daio_imap_delete()
669 if (list_empty(&mgr->imappers)) { in daio_imap_delete()
670 input_mapper_add(&mgr->imappers, mgr->init_imap, in daio_imap_delete()
671 daio_map_op, mgr); in daio_imap_delete()
672 mgr->init_imap_added = 1; in daio_imap_delete()
674 spin_unlock_irqrestore(&mgr->imap_lock, flags); in daio_imap_delete()
679 static int daio_mgr_commit_write(struct daio_mgr *mgr) in daio_mgr_commit_write() argument
681 struct hw *hw = mgr->mgr.hw; in daio_mgr_commit_write()
683 hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); in daio_mgr_commit_write()
698 err = rsc_mgr_init(&daio_mgr->mgr, DAIO, NUM_DAIOTYP, hw); in daio_mgr_create()
725 hw->daio_mgr_dsb_dao(daio_mgr->mgr.ctrl_blk, i); in daio_mgr_create()
726 hw->daio_mgr_dsb_dai(daio_mgr->mgr.ctrl_blk, i); in daio_mgr_create()
728 hw->daio_mgr_commit_write(hw, daio_mgr->mgr.ctrl_blk); in daio_mgr_create()
735 rsc_mgr_uninit(&daio_mgr->mgr); in daio_mgr_create()
750 rsc_mgr_uninit(&daio_mgr->mgr); in daio_mgr_destroy()