Lines Matching refs:freezer

790 	sdiodev->freezer = kzalloc(sizeof(*sdiodev->freezer), GFP_KERNEL);  in brcmf_sdiod_freezer_attach()
791 if (!sdiodev->freezer) in brcmf_sdiod_freezer_attach()
793 atomic_set(&sdiodev->freezer->thread_count, 0); in brcmf_sdiod_freezer_attach()
794 atomic_set(&sdiodev->freezer->freezing, 0); in brcmf_sdiod_freezer_attach()
795 init_waitqueue_head(&sdiodev->freezer->thread_freeze); in brcmf_sdiod_freezer_attach()
796 init_completion(&sdiodev->freezer->resumed); in brcmf_sdiod_freezer_attach()
802 if (sdiodev->freezer) { in brcmf_sdiod_freezer_detach()
803 WARN_ON(atomic_read(&sdiodev->freezer->freezing)); in brcmf_sdiod_freezer_detach()
804 kfree(sdiodev->freezer); in brcmf_sdiod_freezer_detach()
810 atomic_t *expect = &sdiodev->freezer->thread_count; in brcmf_sdiod_freezer_on()
813 sdiodev->freezer->frozen_count = 0; in brcmf_sdiod_freezer_on()
814 reinit_completion(&sdiodev->freezer->resumed); in brcmf_sdiod_freezer_on()
815 atomic_set(&sdiodev->freezer->freezing, 1); in brcmf_sdiod_freezer_on()
817 wait_event(sdiodev->freezer->thread_freeze, in brcmf_sdiod_freezer_on()
818 atomic_read(expect) == sdiodev->freezer->frozen_count); in brcmf_sdiod_freezer_on()
830 atomic_set(&sdiodev->freezer->freezing, 0); in brcmf_sdiod_freezer_off()
831 complete_all(&sdiodev->freezer->resumed); in brcmf_sdiod_freezer_off()
836 return atomic_read(&sdiodev->freezer->freezing); in brcmf_sdiod_freezing()
843 sdiodev->freezer->frozen_count++; in brcmf_sdiod_try_freeze()
844 wake_up(&sdiodev->freezer->thread_freeze); in brcmf_sdiod_try_freeze()
845 wait_for_completion(&sdiodev->freezer->resumed); in brcmf_sdiod_try_freeze()
850 atomic_inc(&sdiodev->freezer->thread_count); in brcmf_sdiod_freezer_count()
855 atomic_dec(&sdiodev->freezer->thread_count); in brcmf_sdiod_freezer_uncount()