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