xref: /freebsd/sys/powerpc/powermac/powermac_thermal.h (revision 84d77676188a15a472ed2c6fb87efdbc73297c34)
1*84d77676SNathan Whitehorn /*-
2*84d77676SNathan Whitehorn  * Copyright (c) 2009-2011 Nathan Whitehorn
3*84d77676SNathan Whitehorn  * All rights reserved.
4*84d77676SNathan Whitehorn  *
5*84d77676SNathan Whitehorn  * Redistribution and use in source and binary forms, with or without
6*84d77676SNathan Whitehorn  * modification, are permitted provided that the following conditions
7*84d77676SNathan Whitehorn  * are met:
8*84d77676SNathan Whitehorn  * 1. Redistributions of source code must retain the above copyright
9*84d77676SNathan Whitehorn  *    notice, this list of conditions and the following disclaimer.
10*84d77676SNathan Whitehorn  * 2. Redistributions in binary form must reproduce the above copyright
11*84d77676SNathan Whitehorn  *    notice, this list of conditions and the following disclaimer in the
12*84d77676SNathan Whitehorn  *    documentation and/or other materials provided with the distribution.
13*84d77676SNathan Whitehorn  *
14*84d77676SNathan Whitehorn  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*84d77676SNathan Whitehorn  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*84d77676SNathan Whitehorn  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*84d77676SNathan Whitehorn  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*84d77676SNathan Whitehorn  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*84d77676SNathan Whitehorn  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*84d77676SNathan Whitehorn  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*84d77676SNathan Whitehorn  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*84d77676SNathan Whitehorn  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*84d77676SNathan Whitehorn  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*84d77676SNathan Whitehorn  * SUCH DAMAGE.
25*84d77676SNathan Whitehorn  *
26*84d77676SNathan Whitehorn  * $FreeBSD$
27*84d77676SNathan Whitehorn  */
28*84d77676SNathan Whitehorn 
29*84d77676SNathan Whitehorn #ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H
30*84d77676SNathan Whitehorn #define _POWERPC_POWERMAC_POWERMAC_THERMAL_H
31*84d77676SNathan Whitehorn 
32*84d77676SNathan Whitehorn struct pmac_fan {
33*84d77676SNathan Whitehorn 	int min_rpm, max_rpm, default_rpm;
34*84d77676SNathan Whitehorn 
35*84d77676SNathan Whitehorn 	char name[32];
36*84d77676SNathan Whitehorn 	int zone;
37*84d77676SNathan Whitehorn 
38*84d77676SNathan Whitehorn 	int (*read)(struct pmac_fan *);
39*84d77676SNathan Whitehorn 	int (*set)(struct pmac_fan *, int value);
40*84d77676SNathan Whitehorn };
41*84d77676SNathan Whitehorn 
42*84d77676SNathan Whitehorn struct pmac_therm {
43*84d77676SNathan Whitehorn 	int target_temp, max_temp;	/* Tenths of a degree K */
44*84d77676SNathan Whitehorn 
45*84d77676SNathan Whitehorn 	char name[32];
46*84d77676SNathan Whitehorn 	int zone;
47*84d77676SNathan Whitehorn 
48*84d77676SNathan Whitehorn 	int (*read)(struct pmac_therm *);
49*84d77676SNathan Whitehorn };
50*84d77676SNathan Whitehorn 
51*84d77676SNathan Whitehorn void pmac_thermal_fan_register(struct pmac_fan *);
52*84d77676SNathan Whitehorn void pmac_thermal_sensor_register(struct pmac_therm *);
53*84d77676SNathan Whitehorn 
54*84d77676SNathan Whitehorn #endif
55