Lines Matching +full:thermal +full:- +full:zone

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Thermal monitoring tool based on the thermal netlink events.
26 #include <thermal.h>
27 #include "thermal-tools.h"
44 th->temperature, th->direction); in show_threshold()
52 tt->id, tt->type, tt->temp, tt->hyst); in show_trip()
61 INFO("temperature: %d\n", tz->temp); in show_temp()
70 INFO("governor: '%s'\n", tz->governor); in show_governor()
77 INFO("thermal zone '%s', id=%d\n", tz->name, tz->id); in show_tz()
79 for_each_thermal_trip(tz->trip, show_trip, NULL); in show_tz()
81 for_each_thermal_threshold(tz->thresholds, show_threshold, NULL); in show_tz()
96 INFO("Setting threshold for thermal zone '%s', id=%d\n", tz->name, tz->id); in set_threshold()
100 return -1; in set_threshold()
108 return -1; in set_threshold()
116 INFO("Thermal zone '%s'/%d created\n", name, tz_id); in tz_create()
123 INFO("Thermal zone %d deleted\n", tz_id); in tz_delete()
131 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in tz_disable()
133 INFO("Thermal zone %d ('%s') disabled\n", tz_id, tz->name); in tz_disable()
141 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in tz_enable()
143 INFO("Thermal zone %d ('%s') enabled\n", tz_id, tz->name); in tz_enable()
151 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in trip_high()
153 INFO("Thermal zone %d ('%s'): trip point %d crossed way up with %d °C\n", in trip_high()
154 tz_id, tz->name, trip_id, temp); in trip_high()
162 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in trip_low()
164 INFO("Thermal zone %d ('%s'): trip point %d crossed way down with %d °C\n", in trip_low()
165 tz_id, tz->name, trip_id, temp); in trip_low()
189 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in trip_change()
194 tz->trip[trip_id].type = type; in trip_change()
195 tz->trip[trip_id].temp = temp; in trip_change()
196 tz->trip[trip_id].hyst = hyst; in trip_change()
225 struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id); in gov_change()
227 INFO("%s: governor changed %s -> %s\n", tz->name, tz->governor, name); in gov_change()
229 strcpy(tz->governor, name); in gov_change()
296 return thermal_events_handle(td->th, td); in thermal_event()
301 printf("%s : A thermal monitoring engine based on notifications\n", cmd); in usage()
303 printf("\t-h, --help\t\tthis help\n"); in usage()
304 printf("\t-d, --daemonize\n"); in usage()
305 printf("\t-l <level>, --loglevel <level>\tlog level: "); in usage()
307 printf("\t-s, --syslog\t\toutput to syslog\n"); in usage()
329 if (opt == -1) in options_init()
334 options->loglevel = log_str2level(optarg); in options_init()
337 options->daemonize = 1; in options_init()
340 options->logopt = TO_SYSLOG; in options_init()
346 return -1; in options_init()
372 ERROR("Usage: %s --help\n", argv[0]); in main()
388 ERROR("Failed to initialize the thermal library\n"); in main()
394 ERROR("No thermal zone available\n"); in main()
412 INFO("Waiting for thermal events ...\n"); in main()
414 if (mainloop(-1)) { in main()