powermac_thermal.h revision 222429
1240116Smarcel/*- 2240116Smarcel * Copyright (c) 2009-2011 Nathan Whitehorn 3240116Smarcel * All rights reserved. 4240116Smarcel * 5240116Smarcel * Redistribution and use in source and binary forms, with or without 6240116Smarcel * modification, are permitted provided that the following conditions 7240116Smarcel * are met: 8240116Smarcel * 1. Redistributions of source code must retain the above copyright 9240116Smarcel * notice, this list of conditions and the following disclaimer. 10240116Smarcel * 2. Redistributions in binary form must reproduce the above copyright 11240116Smarcel * notice, this list of conditions and the following disclaimer in the 12240116Smarcel * documentation and/or other materials provided with the distribution. 13240116Smarcel * 14240116Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15240116Smarcel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16240116Smarcel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17240116Smarcel * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18240116Smarcel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19240116Smarcel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20240116Smarcel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21240116Smarcel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22240116Smarcel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23240116Smarcel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24240116Smarcel * SUCH DAMAGE. 25240116Smarcel * 26240116Smarcel * $FreeBSD: head/sys/powerpc/powermac/powermac_thermal.h 222429 2011-05-28 21:13:22Z nwhitehorn $ 27240116Smarcel */ 28240116Smarcel 29240116Smarcel#ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H 30240116Smarcel#define _POWERPC_POWERMAC_POWERMAC_THERMAL_H 31240116Smarcel 32240116Smarcelstruct pmac_fan { 33240116Smarcel int min_rpm, max_rpm, default_rpm; 34240116Smarcel 35240116Smarcel char name[32]; 36240116Smarcel int zone; 37240116Smarcel 38240116Smarcel int (*read)(struct pmac_fan *); 39240116Smarcel int (*set)(struct pmac_fan *, int value); 40240116Smarcel}; 41240116Smarcel 42240116Smarcelstruct pmac_therm { 43240116Smarcel int target_temp, max_temp; /* Tenths of a degree K */ 44240116Smarcel 45240116Smarcel char name[32]; 46240116Smarcel int zone; 47240116Smarcel 48240116Smarcel int (*read)(struct pmac_therm *); 49240116Smarcel}; 50240116Smarcel 51240116Smarcelvoid pmac_thermal_fan_register(struct pmac_fan *); 52240116Smarcelvoid pmac_thermal_sensor_register(struct pmac_therm *); 53240116Smarcel 54240116Smarcel#endif 55240116Smarcel