powermac_thermal.h revision 222659
1215976Sjmallett/*- 2232812Sjmallett * Copyright (c) 2009-2011 Nathan Whitehorn 3215976Sjmallett * All rights reserved. 4215976Sjmallett * 5215976Sjmallett * Redistribution and use in source and binary forms, with or without 6215976Sjmallett * modification, are permitted provided that the following conditions 7215976Sjmallett * are met: 8215976Sjmallett * 1. Redistributions of source code must retain the above copyright 9215976Sjmallett * notice, this list of conditions and the following disclaimer. 10215976Sjmallett * 2. Redistributions in binary form must reproduce the above copyright 11215976Sjmallett * notice, this list of conditions and the following disclaimer in the 12215976Sjmallett * documentation and/or other materials provided with the distribution. 13215976Sjmallett * 14215976Sjmallett * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15215976Sjmallett * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16215976Sjmallett * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17215976Sjmallett * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18232812Sjmallett * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19215976Sjmallett * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20215976Sjmallett * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21215976Sjmallett * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22215976Sjmallett * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23215976Sjmallett * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24215976Sjmallett * SUCH DAMAGE. 25215976Sjmallett * 26215976Sjmallett * $FreeBSD: head/sys/powerpc/powermac/powermac_thermal.h 222659 2011-06-03 20:43:12Z andreast $ 27215976Sjmallett */ 28215976Sjmallett 29232812Sjmallett#ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H 30215976Sjmallett#define _POWERPC_POWERMAC_POWERMAC_THERMAL_H 31215976Sjmallett 32215976Sjmallett#define ZERO_C_TO_K 2732 33215976Sjmallett 34215976Sjmallettstruct pmac_fan { 35215976Sjmallett int min_rpm, max_rpm, default_rpm; 36215976Sjmallett 37215976Sjmallett char name[32]; 38215976Sjmallett int zone; 39215976Sjmallett 40215976Sjmallett int (*read)(struct pmac_fan *); 41215976Sjmallett int (*set)(struct pmac_fan *, int value); 42215976Sjmallett}; 43215976Sjmallett 44215976Sjmallettstruct pmac_therm { 45215976Sjmallett int target_temp, max_temp; /* Tenths of a degree K */ 46215976Sjmallett 47215976Sjmallett char name[32]; 48215976Sjmallett int zone; 49215976Sjmallett 50215976Sjmallett int (*read)(struct pmac_therm *); 51215976Sjmallett}; 52232812Sjmallett 53215976Sjmallettvoid pmac_thermal_fan_register(struct pmac_fan *); 54215976Sjmallettvoid pmac_thermal_sensor_register(struct pmac_therm *); 55215976Sjmallett 56215976Sjmallett#endif 57215976Sjmallett