@@ -73,17 +73,14 @@ struct thermal_trip {
73
73
void * priv ;
74
74
};
75
75
76
- struct thermal_trip_desc {
77
- struct thermal_trip trip ;
78
- int threshold ;
79
- };
80
-
81
76
#define THERMAL_TRIP_FLAG_RW_TEMP BIT(0)
82
77
#define THERMAL_TRIP_FLAG_RW_HYST BIT(1)
83
78
84
79
#define THERMAL_TRIP_FLAG_RW (THERMAL_TRIP_FLAG_RW_TEMP | \
85
80
THERMAL_TRIP_FLAG_RW_HYST)
86
81
82
+ struct thermal_zone_device ;
83
+
87
84
struct thermal_zone_device_ops {
88
85
int (* bind ) (struct thermal_zone_device * ,
89
86
struct thermal_cooling_device * );
@@ -129,86 +126,6 @@ struct thermal_cooling_device {
129
126
#endif
130
127
};
131
128
132
- /**
133
- * struct thermal_zone_device - structure for a thermal zone
134
- * @id: unique id number for each thermal zone
135
- * @type: the thermal zone device type
136
- * @device: &struct device for this thermal zone
137
- * @removal: removal completion
138
- * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature
139
- * @trip_type_attrs: attributes for trip points for sysfs: trip type
140
- * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis
141
- * @mode: current mode of this thermal zone
142
- * @devdata: private pointer for device private data
143
- * @num_trips: number of trip points the thermal zone supports
144
- * @passive_delay_jiffies: number of jiffies to wait between polls when
145
- * performing passive cooling.
146
- * @polling_delay_jiffies: number of jiffies to wait between polls when
147
- * checking whether trip points have been crossed (0 for
148
- * interrupt driven systems)
149
- * @temperature: current temperature. This is only for core code,
150
- * drivers should use thermal_zone_get_temp() to get the
151
- * current temperature
152
- * @last_temperature: previous temperature read
153
- * @emul_temperature: emulated temperature when using CONFIG_THERMAL_EMULATION
154
- * @passive: 1 if you've crossed a passive trip point, 0 otherwise.
155
- * @prev_low_trip: the low current temperature if you've crossed a passive
156
- trip point.
157
- * @prev_high_trip: the above current temperature if you've crossed a
158
- passive trip point.
159
- * @need_update: if equals 1, thermal_zone_device_update needs to be invoked.
160
- * @ops: operations this &thermal_zone_device supports
161
- * @tzp: thermal zone parameters
162
- * @governor: pointer to the governor for this thermal zone
163
- * @governor_data: private pointer for governor data
164
- * @thermal_instances: list of &struct thermal_instance of this thermal zone
165
- * @ida: &struct ida to generate unique id for this zone's cooling
166
- * devices
167
- * @lock: lock to protect thermal_instances list
168
- * @node: node in thermal_tz_list (in thermal_core.c)
169
- * @poll_queue: delayed work for polling
170
- * @notify_event: Last notification event
171
- * @suspended: thermal zone suspend indicator
172
- * @trips: array of struct thermal_trip objects
173
- */
174
- struct thermal_zone_device {
175
- int id ;
176
- char type [THERMAL_NAME_LENGTH ];
177
- struct device device ;
178
- struct completion removal ;
179
- struct attribute_group trips_attribute_group ;
180
- struct thermal_attr * trip_temp_attrs ;
181
- struct thermal_attr * trip_type_attrs ;
182
- struct thermal_attr * trip_hyst_attrs ;
183
- enum thermal_device_mode mode ;
184
- void * devdata ;
185
- int num_trips ;
186
- unsigned long passive_delay_jiffies ;
187
- unsigned long polling_delay_jiffies ;
188
- int temperature ;
189
- int last_temperature ;
190
- int emul_temperature ;
191
- int passive ;
192
- int prev_low_trip ;
193
- int prev_high_trip ;
194
- atomic_t need_update ;
195
- struct thermal_zone_device_ops ops ;
196
- struct thermal_zone_params * tzp ;
197
- struct thermal_governor * governor ;
198
- void * governor_data ;
199
- struct list_head thermal_instances ;
200
- struct ida ida ;
201
- struct mutex lock ;
202
- struct list_head node ;
203
- struct delayed_work poll_queue ;
204
- enum thermal_notify_event notify_event ;
205
- bool suspended ;
206
- #ifdef CONFIG_THERMAL_DEBUGFS
207
- struct thermal_debugfs * debugfs ;
208
- #endif
209
- struct thermal_trip_desc trips [] __counted_by (num_trips );
210
- };
211
-
212
129
/**
213
130
* struct thermal_governor - structure that holds thermal governor information
214
131
* @name: name of the governor
0 commit comments