powermac_thermal.h revision 300421
1222429Snwhitehorn/*- 2222429Snwhitehorn * Copyright (c) 2009-2011 Nathan Whitehorn 3222429Snwhitehorn * All rights reserved. 4222429Snwhitehorn * 5222429Snwhitehorn * Redistribution and use in source and binary forms, with or without 6222429Snwhitehorn * modification, are permitted provided that the following conditions 7222429Snwhitehorn * are met: 8222429Snwhitehorn * 1. Redistributions of source code must retain the above copyright 9222429Snwhitehorn * notice, this list of conditions and the following disclaimer. 10222429Snwhitehorn * 2. Redistributions in binary form must reproduce the above copyright 11222429Snwhitehorn * notice, this list of conditions and the following disclaimer in the 12222429Snwhitehorn * documentation and/or other materials provided with the distribution. 13222429Snwhitehorn * 14222429Snwhitehorn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15222429Snwhitehorn * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16222429Snwhitehorn * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17222429Snwhitehorn * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18222429Snwhitehorn * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19222429Snwhitehorn * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20222429Snwhitehorn * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21222429Snwhitehorn * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22222429Snwhitehorn * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23222429Snwhitehorn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24222429Snwhitehorn * SUCH DAMAGE. 25222429Snwhitehorn * 26222429Snwhitehorn * $FreeBSD: head/sys/powerpc/powermac/powermac_thermal.h 300421 2016-05-22 13:58:32Z loos $ 27222429Snwhitehorn */ 28222429Snwhitehorn 29222429Snwhitehorn#ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H 30222429Snwhitehorn#define _POWERPC_POWERMAC_POWERMAC_THERMAL_H 31222429Snwhitehorn 32300421Sloos#define ZERO_C_TO_K 2731 33222659Sandreast 34222429Snwhitehornstruct pmac_fan { 35222429Snwhitehorn int min_rpm, max_rpm, default_rpm; 36222429Snwhitehorn 37222429Snwhitehorn char name[32]; 38222429Snwhitehorn int zone; 39222429Snwhitehorn 40222429Snwhitehorn int (*read)(struct pmac_fan *); 41222429Snwhitehorn int (*set)(struct pmac_fan *, int value); 42222429Snwhitehorn}; 43222429Snwhitehorn 44222429Snwhitehornstruct pmac_therm { 45222429Snwhitehorn int target_temp, max_temp; /* Tenths of a degree K */ 46222429Snwhitehorn 47222429Snwhitehorn char name[32]; 48222429Snwhitehorn int zone; 49222429Snwhitehorn 50222429Snwhitehorn int (*read)(struct pmac_therm *); 51222429Snwhitehorn}; 52222429Snwhitehorn 53222429Snwhitehornvoid pmac_thermal_fan_register(struct pmac_fan *); 54222429Snwhitehornvoid pmac_thermal_sensor_register(struct pmac_therm *); 55222429Snwhitehorn 56222429Snwhitehorn#endif 57