Lines Matching refs:trips
169 struct acpi_thermal_trips trips; member
274 tz->trips.critical.temperature = tmp; in acpi_thermal_trips_update()
282 tz->trips.critical.flags.valid = 0; in acpi_thermal_trips_update()
287 tz->trips.critical.flags.valid = 0; in acpi_thermal_trips_update()
289 tz->trips.critical.flags.valid = 1; in acpi_thermal_trips_update()
292 tz->trips.critical.temperature); in acpi_thermal_trips_update()
294 if (tz->trips.critical.flags.valid == 1) { in acpi_thermal_trips_update()
296 tz->trips.critical.flags.valid = 0; in acpi_thermal_trips_update()
303 if (crt_k > tz->trips.critical.temperature) in acpi_thermal_trips_update()
306 tz->trips.critical.temperature = crt_k; in acpi_thermal_trips_update()
315 tz->trips.hot.flags.valid = 0; in acpi_thermal_trips_update()
319 tz->trips.hot.temperature = tmp; in acpi_thermal_trips_update()
320 tz->trips.hot.flags.valid = 1; in acpi_thermal_trips_update()
323 tz->trips.hot.temperature); in acpi_thermal_trips_update()
328 if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) || in acpi_thermal_trips_update()
330 valid = tz->trips.passive.flags.valid; in acpi_thermal_trips_update()
342 tz->trips.passive.flags.valid = 0; in acpi_thermal_trips_update()
344 tz->trips.passive.temperature = tmp; in acpi_thermal_trips_update()
345 tz->trips.passive.flags.valid = 1; in acpi_thermal_trips_update()
350 tz->trips.passive.flags.valid = 0; in acpi_thermal_trips_update()
352 tz->trips.passive.tc1 = tmp; in acpi_thermal_trips_update()
357 tz->trips.passive.flags.valid = 0; in acpi_thermal_trips_update()
359 tz->trips.passive.tc2 = tmp; in acpi_thermal_trips_update()
364 tz->trips.passive.flags.valid = 0; in acpi_thermal_trips_update()
366 tz->trips.passive.tsp = tmp; in acpi_thermal_trips_update()
370 if ((flag & ACPI_TRIPS_DEVICES) && tz->trips.passive.flags.valid) { in acpi_thermal_trips_update()
377 tz->trips.passive.flags.valid = 0; in acpi_thermal_trips_update()
379 tz->trips.passive.flags.valid = 1; in acpi_thermal_trips_update()
382 if (memcmp(&tz->trips.passive.devices, &devices, in acpi_thermal_trips_update()
384 memcpy(&tz->trips.passive.devices, &devices, in acpi_thermal_trips_update()
390 if (valid != tz->trips.passive.flags.valid) in acpi_thermal_trips_update()
397 valid = tz->trips.active[i].flags.valid; in acpi_thermal_trips_update()
403 tz->trips.active[i].flags.valid)) { in acpi_thermal_trips_update()
407 tz->trips.active[i].flags.valid = 0; in acpi_thermal_trips_update()
415 tz->trips.active[0].temperature = celsius_to_deci_kelvin(act); in acpi_thermal_trips_update()
421 tz->trips.active[i-1].temperature = in acpi_thermal_trips_update()
422 (tz->trips.active[i-2].temperature < in acpi_thermal_trips_update()
424 tz->trips.active[i-2].temperature : in acpi_thermal_trips_update()
429 tz->trips.active[i].temperature = tmp; in acpi_thermal_trips_update()
430 tz->trips.active[i].flags.valid = 1; in acpi_thermal_trips_update()
435 if ((flag & ACPI_TRIPS_DEVICES) && tz->trips.active[i].flags.valid) { in acpi_thermal_trips_update()
442 tz->trips.active[i].flags.valid = 0; in acpi_thermal_trips_update()
444 tz->trips.active[i].flags.valid = 1; in acpi_thermal_trips_update()
447 if (memcmp(&tz->trips.active[i].devices, &devices, in acpi_thermal_trips_update()
449 memcpy(&tz->trips.active[i].devices, &devices, in acpi_thermal_trips_update()
455 if (valid != tz->trips.active[i].flags.valid) in acpi_thermal_trips_update()
458 if (!tz->trips.active[i].flags.valid) in acpi_thermal_trips_update()
483 valid = tz->trips.critical.flags.valid | in acpi_thermal_get_trip_points()
484 tz->trips.hot.flags.valid | in acpi_thermal_get_trip_points()
485 tz->trips.passive.flags.valid; in acpi_thermal_get_trip_points()
488 valid |= tz->trips.active[i].flags.valid; in acpi_thermal_get_trip_points()
525 if (tz->trips.critical.flags.valid) { in thermal_get_trip_type()
533 if (tz->trips.hot.flags.valid) { in thermal_get_trip_type()
541 if (tz->trips.passive.flags.valid) { in thermal_get_trip_type()
549 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && tz->trips.active[i].flags.valid; i++) { in thermal_get_trip_type()
569 if (tz->trips.critical.flags.valid) { in thermal_get_trip_temp()
572 tz->trips.critical.temperature, in thermal_get_trip_temp()
579 if (tz->trips.hot.flags.valid) { in thermal_get_trip_temp()
582 tz->trips.hot.temperature, in thermal_get_trip_temp()
589 if (tz->trips.passive.flags.valid) { in thermal_get_trip_temp()
592 tz->trips.passive.temperature, in thermal_get_trip_temp()
600 tz->trips.active[i].flags.valid; i++) { in thermal_get_trip_temp()
603 tz->trips.active[i].temperature, in thermal_get_trip_temp()
618 if (tz->trips.critical.flags.valid) { in thermal_get_crit_temp()
620 tz->trips.critical.temperature, in thermal_get_crit_temp()
658 i = tz->trips.passive.tc1 * (tz->temperature - tz->last_temperature) + in thermal_get_trend()
659 tz->trips.passive.tc2 * (tz->temperature - tz->trips.passive.temperature); in thermal_get_trend()
704 if (tz->trips.critical.flags.valid) in acpi_thermal_cooling_device_cb()
707 if (tz->trips.hot.flags.valid) in acpi_thermal_cooling_device_cb()
710 if (tz->trips.passive.flags.valid) { in acpi_thermal_cooling_device_cb()
712 for (i = 0; i < tz->trips.passive.devices.count; i++) { in acpi_thermal_cooling_device_cb()
713 handle = tz->trips.passive.devices.handles[i]; in acpi_thermal_cooling_device_cb()
735 if (!tz->trips.active[i].flags.valid) in acpi_thermal_cooling_device_cb()
739 for (j = 0; j < tz->trips.active[i].devices.count; j++) { in acpi_thermal_cooling_device_cb()
740 handle = tz->trips.active[i].devices.handles[j]; in acpi_thermal_cooling_device_cb()
792 int trips = 0; in acpi_thermal_register_thermal_zone() local
797 if (tz->trips.critical.flags.valid) in acpi_thermal_register_thermal_zone()
798 trips++; in acpi_thermal_register_thermal_zone()
800 if (tz->trips.hot.flags.valid) in acpi_thermal_register_thermal_zone()
801 trips++; in acpi_thermal_register_thermal_zone()
803 if (tz->trips.passive.flags.valid) in acpi_thermal_register_thermal_zone()
804 trips++; in acpi_thermal_register_thermal_zone()
806 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && tz->trips.active[i].flags.valid; in acpi_thermal_register_thermal_zone()
807 i++, trips++); in acpi_thermal_register_thermal_zone()
809 if (tz->trips.passive.flags.valid) in acpi_thermal_register_thermal_zone()
810 tz->thermal_zone = thermal_zone_device_register("acpitz", trips, 0, tz, in acpi_thermal_register_thermal_zone()
812 tz->trips.passive.tsp * 100, in acpi_thermal_register_thermal_zone()
816 thermal_zone_device_register("acpitz", trips, 0, tz, in acpi_thermal_register_thermal_zone()
988 if (tz->trips.critical.flags.valid && in acpi_thermal_guess_offset()
989 (tz->trips.critical.temperature % 5) == 1) in acpi_thermal_guess_offset()
1098 if (!tz->trips.active[i].flags.valid) in acpi_thermal_resume()
1101 tz->trips.active[i].flags.enabled = 1; in acpi_thermal_resume()
1102 for (j = 0; j < tz->trips.active[i].devices.count; j++) { in acpi_thermal_resume()
1104 tz->trips.active[i].devices.handles[j], in acpi_thermal_resume()
1107 tz->trips.active[i].flags.enabled = 0; in acpi_thermal_resume()
1111 tz->state.active |= tz->trips.active[i].flags.enabled; in acpi_thermal_resume()