1 // SPDX-License-Identifier: MIT
3 * Copyright(c) 2020 Intel Corporation.
7 #include "intel_pxp_irq.h"
8 #include "intel_pxp_pm.h"
9 #include "intel_pxp_session.h"
11 void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
13 if (!intel_pxp_is_enabled(pxp))
16 pxp->arb_is_valid = false;
19 * Contexts using protected objects keep a runtime PM reference, so we
20 * can only runtime suspend when all of them have been either closed
21 * or banned. Therefore, there is no need to invalidate in that
25 intel_pxp_invalidate(pxp);
27 intel_pxp_fini_hw(pxp);
29 pxp->hw_state_invalidated = false;
32 void intel_pxp_resume(struct intel_pxp *pxp)
34 if (!intel_pxp_is_enabled(pxp))
38 * The PXP component gets automatically unbound when we go into S3 and
39 * re-bound after we come out, so in that scenario we can defer the
40 * hw init to the bind call.
42 if (!pxp->pxp_component)
45 intel_pxp_init_hw(pxp);