blob: 8d48ed1db0ad4b1f61c3e24543940be103ba2039 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*
* include/linux/therm_est.h
*
* Copyright (c) 2010-2012, NVIDIA Corporation.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _LINUX_THERM_EST_H
#define _LINUX_THERM_EST_H
#include <linux/workqueue.h>
#define HIST_LEN (20)
#define MAX_ACTIVE_STATES 10
struct therm_est_subdevice {
void *dev_data;
int (*get_temp)(void *, long *);
long coeffs[HIST_LEN];
long hist[HIST_LEN];
};
struct therm_est_data {
/* trip point info : there's only 1 trip point */
char *cdev_type; /* cooling device for this trip */
long trip_temp;
/* zone parameters */
long toffset;
long polling_period;
int passive_delay;
int ndevs;
struct therm_est_subdevice devs[];
};
struct therm_fan_est_subdevice {
void *dev_data;
int (*get_temp)(void *, long *);
long coeffs[HIST_LEN];
long hist[HIST_LEN];
};
struct therm_fan_est_data {
long toffset;
long polling_period;
int ndevs;
int active_trip_temps[MAX_ACTIVE_STATES];
struct therm_fan_est_subdevice devs[];
};
#endif /* _LINUX_THERM_EST_H */
|