powermac_thermal.h revision 302408
10Sstevel@tonic-gate/*- 20Sstevel@tonic-gate * Copyright (c) 2009-2011 Nathan Whitehorn 30Sstevel@tonic-gate * All rights reserved. 40Sstevel@tonic-gate * 53028Smh27603 * Redistribution and use in source and binary forms, with or without 63028Smh27603 * modification, are permitted provided that the following conditions 70Sstevel@tonic-gate * are met: 80Sstevel@tonic-gate * 1. Redistributions of source code must retain the above copyright 90Sstevel@tonic-gate * notice, this list of conditions and the following disclaimer. 100Sstevel@tonic-gate * 2. Redistributions in binary form must reproduce the above copyright 110Sstevel@tonic-gate * notice, this list of conditions and the following disclaimer in the 120Sstevel@tonic-gate * documentation and/or other materials provided with the distribution. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 150Sstevel@tonic-gate * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 160Sstevel@tonic-gate * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 170Sstevel@tonic-gate * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 180Sstevel@tonic-gate * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 190Sstevel@tonic-gate * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 200Sstevel@tonic-gate * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 210Sstevel@tonic-gate * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 228906SEric.Saxe@Sun.COM * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 230Sstevel@tonic-gate * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 240Sstevel@tonic-gate * SUCH DAMAGE. 250Sstevel@tonic-gate * 260Sstevel@tonic-gate * $FreeBSD: stable/11/sys/powerpc/powermac/powermac_thermal.h 300421 2016-05-22 13:58:32Z loos $ 270Sstevel@tonic-gate */ 280Sstevel@tonic-gate 290Sstevel@tonic-gate#ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H 300Sstevel@tonic-gate#define _POWERPC_POWERMAC_POWERMAC_THERMAL_H 310Sstevel@tonic-gate 320Sstevel@tonic-gate#define ZERO_C_TO_K 2731 330Sstevel@tonic-gate 340Sstevel@tonic-gatestruct pmac_fan { 358906SEric.Saxe@Sun.COM int min_rpm, max_rpm, default_rpm; 360Sstevel@tonic-gate 370Sstevel@tonic-gate char name[32]; 380Sstevel@tonic-gate int zone; 390Sstevel@tonic-gate 400Sstevel@tonic-gate int (*read)(struct pmac_fan *); 410Sstevel@tonic-gate int (*set)(struct pmac_fan *, int value); 420Sstevel@tonic-gate}; 430Sstevel@tonic-gate 440Sstevel@tonic-gatestruct pmac_therm { 450Sstevel@tonic-gate int target_temp, max_temp; /* Tenths of a degree K */ 460Sstevel@tonic-gate 470Sstevel@tonic-gate char name[32]; 480Sstevel@tonic-gate int zone; 490Sstevel@tonic-gate 500Sstevel@tonic-gate int (*read)(struct pmac_therm *); 510Sstevel@tonic-gate}; 520Sstevel@tonic-gate 530Sstevel@tonic-gatevoid pmac_thermal_fan_register(struct pmac_fan *); 540Sstevel@tonic-gatevoid pmac_thermal_sensor_register(struct pmac_therm *); 550Sstevel@tonic-gate 568906SEric.Saxe@Sun.COM#endif 570Sstevel@tonic-gate