• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2015 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 
24 #ifndef IGT_PM_H
25 #define IGT_PM_H
26 
27 void igt_pm_enable_audio_runtime_pm(void);
28 int8_t *igt_pm_enable_sata_link_power_management(void);
29 void igt_pm_restore_sata_link_power_management(int8_t *pm_data);
30 
31 /**
32  * igt_runtime_pm_status:
33  * @IGT_RUNTIME_PM_STATUS_ACTIVE: device is active
34  * @IGT_RUNTIME_PM_STATUS_SUSPENDED: device is suspended
35  * @IGT_RUNTIME_PM_STATUS_SUSPENDING: device is in the process of suspending
36  * @IGT_RUNTIME_PM_STATUS_RESUMING: device is in the process of resuming
37  * @IGT_RUNTIME_PM_STATUS_UNKNOWN: unknown runtime PM status
38  *
39  * Symbolic values for runtime PM device status.
40  */
41 enum igt_runtime_pm_status {
42 	IGT_RUNTIME_PM_STATUS_ACTIVE,
43 	IGT_RUNTIME_PM_STATUS_SUSPENDED,
44 	IGT_RUNTIME_PM_STATUS_SUSPENDING,
45 	IGT_RUNTIME_PM_STATUS_RESUMING,
46 	IGT_RUNTIME_PM_STATUS_UNKNOWN,
47 };
48 
49 bool igt_setup_runtime_pm(void);
50 void igt_restore_runtime_pm(void);
51 enum igt_runtime_pm_status igt_get_runtime_pm_status(void);
52 bool igt_wait_for_pm_status(enum igt_runtime_pm_status status);
53 
54 #endif /* IGT_PM_H */
55