windfarm.h (e074d08e2b98db1b19328bb9395052b34366831d) windfarm.h (33e6820b767a5bfa4a0d579da6ee4568a2b1e730)
1/*
2 * Windfarm PowerMac thermal control.
3 *
4 * (c) Copyright 2005 Benjamin Herrenschmidt, IBM Corp.
5 * <benh@kernel.crashing.org>
6 *
7 * Released under the term of the GNU GPL v2.
8 */

--- 58 unchanged lines hidden (view full) ---

67}
68
69static inline int wf_control_set_min(struct wf_control *ct)
70{
71 s32 vmin = ct->ops->get_min(ct);
72 return ct->ops->set_value(ct, vmin);
73}
74
1/*
2 * Windfarm PowerMac thermal control.
3 *
4 * (c) Copyright 2005 Benjamin Herrenschmidt, IBM Corp.
5 * <benh@kernel.crashing.org>
6 *
7 * Released under the term of the GNU GPL v2.
8 */

--- 58 unchanged lines hidden (view full) ---

67}
68
69static inline int wf_control_set_min(struct wf_control *ct)
70{
71 s32 vmin = ct->ops->get_min(ct);
72 return ct->ops->set_value(ct, vmin);
73}
74
75static inline int wf_control_set(struct wf_control *ct, s32 val)
76{
77 return ct->ops->set_value(ct, val);
78}
79
80static inline int wf_control_get(struct wf_control *ct, s32 *val)
81{
82 return ct->ops->get_value(ct, val);
83}
84
85static inline s32 wf_control_get_min(struct wf_control *ct)
86{
87 return ct->ops->get_min(ct);
88}
89
90static inline s32 wf_control_get_max(struct wf_control *ct)
91{
92 return ct->ops->get_max(ct);
93}
94
75/*
76 * Sensor objects
77 */
78
79struct wf_sensor;
80
81struct wf_sensor_ops {
82 int (*get_value)(struct wf_sensor *sr, s32 *val);

--- 12 unchanged lines hidden (view full) ---

95
96/* Same lifetime rules as controls */
97extern int wf_register_sensor(struct wf_sensor *sr);
98extern void wf_unregister_sensor(struct wf_sensor *sr);
99extern struct wf_sensor * wf_find_sensor(const char *name);
100extern int wf_get_sensor(struct wf_sensor *sr);
101extern void wf_put_sensor(struct wf_sensor *sr);
102
95/*
96 * Sensor objects
97 */
98
99struct wf_sensor;
100
101struct wf_sensor_ops {
102 int (*get_value)(struct wf_sensor *sr, s32 *val);

--- 12 unchanged lines hidden (view full) ---

115
116/* Same lifetime rules as controls */
117extern int wf_register_sensor(struct wf_sensor *sr);
118extern void wf_unregister_sensor(struct wf_sensor *sr);
119extern struct wf_sensor * wf_find_sensor(const char *name);
120extern int wf_get_sensor(struct wf_sensor *sr);
121extern void wf_put_sensor(struct wf_sensor *sr);
122
123static inline int wf_sensor_get(struct wf_sensor *sr, s32 *val)
124{
125 return sr->ops->get_value(sr, val);
126}
127
103/* For use by clients. Note that we are a bit racy here since
104 * notifier_block doesn't have a module owner field. I may fix
105 * it one day ...
106 *
107 * LOCKING NOTE !
108 *
109 * All "events" except WF_EVENT_TICK are called with an internal mutex
110 * held which will deadlock if you call basically any core routine.

--- 25 unchanged lines hidden ---
128/* For use by clients. Note that we are a bit racy here since
129 * notifier_block doesn't have a module owner field. I may fix
130 * it one day ...
131 *
132 * LOCKING NOTE !
133 *
134 * All "events" except WF_EVENT_TICK are called with an internal mutex
135 * held which will deadlock if you call basically any core routine.

--- 25 unchanged lines hidden ---