Lines Matching refs:tz

57 struct tz {  struct
66 struct tz *tz; argument
105 config_setting_t *tz; in configuration_init() local
127 tz = config_lookup(&cfg, "thermal-zones"); in configuration_init()
128 if (!tz) { in configuration_init()
133 length = config_setting_length(tz); in configuration_init()
143 node = config_setting_get_elem(tz, i); in configuration_init()
271 thermometer->tz = realloc(thermometer->tz, in thermometer_add_tz()
272 sizeof(*thermometer->tz) * (thermometer->nr_tz + 1)); in thermometer_add_tz()
273 if (!thermometer->tz) { in thermometer_add_tz()
278 thermometer->tz[thermometer->nr_tz].fd_temp = fd; in thermometer_add_tz()
279 thermometer->tz[thermometer->nr_tz].name = strdup(name); in thermometer_add_tz()
280 thermometer->tz[thermometer->nr_tz].polling = polling; in thermometer_add_tz()
343 struct tz *tz = arg; in timer_temperature_callback() local
346 pread(tz->fd_temp, buf, sizeof(buf), 0); in timer_temperature_callback()
348 fprintf(tz->file_out, "%ld %s", getuptimeofday_ms(), buf); in timer_temperature_callback()
373 thermometer->tz[i].name, options->postfix); in thermometer_start()
386 fprintf(f, "timestamp(ms) %s(°mC)\n", thermometer->tz[i].name); in thermometer_start()
388 thermometer->tz[i].file_out = f; in thermometer_start()
390 DEBUG("Created '%s' file for thermal zone '%s'\n", path, thermometer->tz[i].name); in thermometer_start()
395 thermometer->tz[i].fd_timer = timerfd_create(CLOCK_MONOTONIC, 0); in thermometer_start()
396 if (thermometer->tz[i].fd_timer < 0) { in thermometer_start()
398 thermometer->tz[i].name); in thermometer_start()
403 thermometer->tz[i].name, thermometer->tz[i].polling); in thermometer_start()
406 msec_to_timespec(thermometer->tz[i].polling); in thermometer_start()
408 if (timerfd_settime(thermometer->tz[i].fd_timer, 0, in thermometer_start()
412 if (mainloop_add(thermometer->tz[i].fd_timer, in thermometer_start()
414 &thermometer->tz[i])) in thermometer_start()
527 fclose(thermometer->tz[i].file_out); in thermometer_stop()