xref: /titanic_52/usr/src/uts/sun4u/sys/i2c/clients/adm1031.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_ADM1031_H
28 #define	_ADM1031_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * This file contains the commands required to read & write to the internal
34  * registers of ADM1031.
35  */
36 
37 #ifdef	__cplusplus
38 extern "C" {
39 #endif
40 
41 
42 
43 #define	ADM1031_PVT_BASE_IOCTL		(I2C_PVT_BASE_IOCTL + 10)
44 
45 #define	ADM1031_MANUAL_MODE		0
46 #define	ADM1031_AUTO_MODE		1
47 
48 /*
49  * Commands to be used to access and modify the control
50  * registers of adm1031.
51  */
52 #define	ADM1031_GET_STATUS_1		(ADM1031_PVT_BASE_IOCTL + 1)
53 #define	ADM1031_GET_STATUS_2		(ADM1031_PVT_BASE_IOCTL + 2)
54 #define	ADM1031_GET_DEVICE_ID		(ADM1031_PVT_BASE_IOCTL + 3)
55 #define	ADM1031_GET_CONFIG_1		(ADM1031_PVT_BASE_IOCTL + 4)
56 #define	ADM1031_GET_CONFIG_2		(ADM1031_PVT_BASE_IOCTL + 5)
57 #define	ADM1031_SET_CONFIG_1		(ADM1031_PVT_BASE_IOCTL + 34)
58 #define	ADM1031_SET_CONFIG_2		(ADM1031_PVT_BASE_IOCTL + 35)
59 
60 
61 /*
62  * Commands to be used for all fan nodes.
63  */
64 #define	ADM1031_GET_FAN_FEATURE		(ADM1031_PVT_BASE_IOCTL + 6)
65 #define	ADM1031_GET_FAN_CONFIG		(ADM1031_PVT_BASE_IOCTL + 8)
66 #define	ADM1031_GET_FAN_LOW_LIMIT	(ADM1031_PVT_BASE_IOCTL + 9)
67 
68 
69 #define	ADM1031_SET_FAN_FEATURE		(ADM1031_PVT_BASE_IOCTL + 36)
70 #define	ADM1031_SET_FAN_FILTER		(ADM1031_PVT_BASE_IOCTL + 38)
71 #define	ADM1031_SET_FAN_LOW_LIMIT	(ADM1031_PVT_BASE_IOCTL + 39)
72 
73 /*
74  * Commands to be used for all temperature nodes.
75  */
76 #define	ADM1031_GET_TEMP_MIN_RANGE	(ADM1031_PVT_BASE_IOCTL + 11)
77 #define	ADM1031_GET_EXTD_TEMP_RESL	(ADM1031_PVT_BASE_IOCTL + 14)
78 #define	ADM1031_GET_TEMP_OFFSET		(ADM1031_PVT_BASE_IOCTL + 15)
79 #define	ADM1031_GET_TEMP_HIGH_LIMIT	(ADM1031_PVT_BASE_IOCTL + 18)
80 #define	ADM1031_GET_TEMP_LOW_LIMIT	(ADM1031_PVT_BASE_IOCTL + 21)
81 #define	ADM1031_GET_TEMP_THERM_LIMIT	(ADM1031_PVT_BASE_IOCTL + 24)
82 
83 
84 #define	ADM1031_SET_TEMP_MIN_RANGE	(ADM1031_PVT_BASE_IOCTL + 41)
85 #define	ADM1031_SET_TEMP_OFFSET		(ADM1031_PVT_BASE_IOCTL + 45)
86 #define	ADM1031_SET_TEMP_HIGH_LIMIT	(ADM1031_PVT_BASE_IOCTL + 48)
87 #define	ADM1031_SET_TEMP_LOW_LIMIT	(ADM1031_PVT_BASE_IOCTL + 51)
88 #define	ADM1031_SET_TEMP_THERM_LIMIT	(ADM1031_PVT_BASE_IOCTL + 54)
89 
90 
91 /*
92  * Commands to be used for accessing and modifying
93  * the internal registers of adm1031.
94  */
95 #define	ADM1031_INTERRUPT_WAIT		(ADM1031_PVT_BASE_IOCTL + 27)
96 #define	ADM1031_GET_MONITOR_MODE	(ADM1031_PVT_BASE_IOCTL + 28)
97 #define	ADM1031_SET_MONITOR_MODE	(ADM1031_PVT_BASE_IOCTL + 29)
98 
99 #ifdef	__cplusplus
100 }
101 #endif
102 
103 #endif	/* _ADM1031_H */
104