Go to the documentation of this file.
10 #ifndef __WINDFARM_H__
11 #define __WINDFARM_H__
14 #include <linux/list.h>
15 #include <linux/module.h>
17 #include <linux/device.h>
20 #define FIX32TOPRINT(f) (((s32)(f)) >> 16),(((((s32)(f)) & 0xffff) * 1000) >> 16)
47 #define WF_CONTROL_TYPE_GENERIC 0
48 #define WF_CONTROL_RPM_FAN 1
49 #define WF_CONTROL_PWM_FAN 2
64 static inline int wf_control_set_max(
struct wf_control *
ct)
66 s32 vmax = ct->
ops->get_max(ct);
67 return ct->
ops->set_value(ct, vmax);
70 static inline int wf_control_set_min(
struct wf_control *ct)
72 s32 vmin = ct->
ops->get_min(ct);
73 return ct->
ops->set_value(ct, vmin);
78 return ct->
ops->set_value(ct, val);
81 static inline int wf_control_get(
struct wf_control *ct,
s32 *val)
83 return ct->
ops->get_value(ct, val);
88 return ct->
ops->get_min(ct);
93 return ct->
ops->get_max(ct);
126 return sr->
ops->get_value(sr, val);
149 #define WF_EVENT_NEW_CONTROL 0
150 #define WF_EVENT_NEW_SENSOR 1
151 #define WF_EVENT_OVERTEMP 2
152 #define WF_EVENT_NORMALTEMP 3
153 #define WF_EVENT_TICK 4