Lines Matching refs:lock

356 static int __hif_pm_runtime_allow_suspend(struct hif_pm_runtime_lock *lock);
583 int hif_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name) in hif_runtime_lock_init() argument
599 lock->lock = context; in hif_runtime_lock_init()
604 void hif_runtime_lock_deinit(struct hif_pm_runtime_lock *lock) in hif_runtime_lock_deinit() argument
606 if (!lock) { in hif_runtime_lock_deinit()
611 hif_debug("Deinitializing Runtime PM wakelock %s", lock->name); in hif_runtime_lock_deinit()
615 __hif_pm_runtime_allow_suspend(lock); in hif_runtime_lock_deinit()
619 qdf_mem_free(lock); in hif_runtime_lock_deinit()
790 static int __hif_pm_runtime_prevent_suspend(struct hif_pm_runtime_lock *lock) in __hif_pm_runtime_prevent_suspend() argument
794 if (lock->active) in __hif_pm_runtime_prevent_suspend()
813 list_add_tail(&lock->list, &gp_hif_rtpm_ctx->prevent_list); in __hif_pm_runtime_prevent_suspend()
814 lock->active = true; in __hif_pm_runtime_prevent_suspend()
829 static int __hif_pm_runtime_allow_suspend(struct hif_pm_runtime_lock *lock) in __hif_pm_runtime_allow_suspend() argument
834 if (gp_hif_rtpm_ctx->prevent_cnt == 0 || !lock->active) in __hif_pm_runtime_allow_suspend()
848 hif_info_high("Put without a Get operation, %s", lock->name); in __hif_pm_runtime_allow_suspend()
855 list_del(&lock->list); in __hif_pm_runtime_allow_suspend()
856 lock->active = false; in __hif_pm_runtime_allow_suspend()
862 int hif_pm_runtime_prevent_suspend(struct hif_pm_runtime_lock *lock) in hif_pm_runtime_prevent_suspend() argument
864 if (!hif_rtpm_enabled() || !lock) in hif_pm_runtime_prevent_suspend()
871 __hif_pm_runtime_prevent_suspend(lock); in hif_pm_runtime_prevent_suspend()
877 lock->name); in hif_pm_runtime_prevent_suspend()
890 int __hif_pm_runtime_prevent_suspend_sync(struct hif_pm_runtime_lock *lock) in __hif_pm_runtime_prevent_suspend_sync() argument
894 if (lock->active) in __hif_pm_runtime_prevent_suspend_sync()
914 list_add_tail(&lock->list, &gp_hif_rtpm_ctx->prevent_list); in __hif_pm_runtime_prevent_suspend_sync()
915 lock->active = true; in __hif_pm_runtime_prevent_suspend_sync()
923 int hif_pm_runtime_prevent_suspend_sync(struct hif_pm_runtime_lock *lock) in hif_pm_runtime_prevent_suspend_sync() argument
928 if (!lock) in hif_pm_runtime_prevent_suspend_sync()
934 __hif_pm_runtime_prevent_suspend_sync(lock); in hif_pm_runtime_prevent_suspend_sync()
939 lock->name); in hif_pm_runtime_prevent_suspend_sync()
944 int hif_pm_runtime_allow_suspend(struct hif_pm_runtime_lock *lock) in hif_pm_runtime_allow_suspend() argument
949 if (!lock) in hif_pm_runtime_allow_suspend()
956 __hif_pm_runtime_allow_suspend(lock); in hif_pm_runtime_allow_suspend()