xref: /titanic_44/usr/src/uts/i86pc/sys/fipe.h (revision 61491074b8a9b27fe22ce320f874f909877c6d91)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright (c) 2009, Intel Corporation.
23  * All rights reserved.
24  */
25 
26 #ifndef	_SYS_FIPE_H
27 #define	_SYS_FIPE_H
28 
29 #include <sys/types.h>
30 #include <sys/sunddi.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /* Device property name for default power management policy. */
37 #define	FIPE_PROP_PM_POLICY		"fipe_pm_policy"
38 
39 #define	FIPE_IOC_CODE			('F' << 8)
40 #define	FIPE_IOCTL_START		(FIPE_IOC_CODE | 0x1)
41 #define	FIPE_IOCTL_STOP			(FIPE_IOC_CODE | 0x2)
42 #define	FIPE_IOCTL_GET_PMPOLICY		(FIPE_IOC_CODE | 0x3)
43 #define	FIPE_IOCTL_SET_PMPOLICY		(FIPE_IOC_CODE | 0x4)
44 
45 typedef enum {
46 	FIPE_PM_POLICY_DISABLE = 0,
47 	FIPE_PM_POLICY_PERFORMANCE = 1,
48 	FIPE_PM_POLICY_BALANCE = 2,
49 	FIPE_PM_POLICY_POWERSAVE = 3,
50 	FIPE_PM_POLICY_MAX
51 } fipe_pm_policy_t;
52 
53 #ifdef _KERNEL
54 
55 extern int fipe_init(dev_info_t *dip);
56 extern int fipe_fini(void);
57 extern int fipe_start(void);
58 extern int fipe_stop(void);
59 extern int fipe_suspend(void);
60 extern int fipe_resume(void);
61 extern int fipe_set_pmpolicy(fipe_pm_policy_t policy);
62 extern fipe_pm_policy_t fipe_get_pmpolicy(void);
63 
64 #endif /* _KERNEL */
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* _SYS_FIPE_H */
71