Skip to content

Commit cbba1d7

Browse files
andrzejtpdlezcano
authored andcommitted
thermal: Add current mode to thermal zone device
Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Bartlomiej Zolnierkiewicz <[email protected]> Reviewed-by: Amit Kucheria <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1595d88 commit cbba1d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/thermal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ struct thermal_cooling_device {
128128
* @trip_temp_attrs: attributes for trip points for sysfs: trip temperature
129129
* @trip_type_attrs: attributes for trip points for sysfs: trip type
130130
* @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis
131+
* @mode: current mode of this thermal zone
131132
* @devdata: private pointer for device private data
132133
* @trips: number of trip points the thermal zone supports
133134
* @trips_disabled; bitmap for disabled trips
@@ -170,6 +171,7 @@ struct thermal_zone_device {
170171
struct thermal_attr *trip_temp_attrs;
171172
struct thermal_attr *trip_type_attrs;
172173
struct thermal_attr *trip_hyst_attrs;
174+
enum thermal_device_mode mode;
173175
void *devdata;
174176
int trips;
175177
unsigned long trips_disabled; /* bitmap for disabled trips */

0 commit comments

Comments
 (0)