Lines Matching full:trip

60  * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid
69 "ACPI thermal trip point %s changed\n" \
75 MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.");
79 MODULE_PARM_DESC(crt, "Disable or lower all critical trip points.");
91 MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
101 struct acpi_thermal_trip trip; member
109 struct acpi_thermal_trip trip; member
256 if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.trip.valid) || in __acpi_thermal_trips_update()
258 valid = tz->trips.passive.trip.valid; in __acpi_thermal_trips_update()
270 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update()
272 tz->trips.passive.trip.temperature = tmp; in __acpi_thermal_trips_update()
273 tz->trips.passive.trip.valid = true; in __acpi_thermal_trips_update()
278 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update()
285 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update()
292 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update()
298 if ((flag & ACPI_TRIPS_DEVICES) && tz->trips.passive.trip.valid) { in __acpi_thermal_trips_update()
305 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update()
307 tz->trips.passive.trip.valid = true; in __acpi_thermal_trips_update()
318 if (valid != tz->trips.passive.trip.valid) in __acpi_thermal_trips_update()
325 valid = tz->trips.active[i].trip.valid; in __acpi_thermal_trips_update()
328 break; /* disable all active trip points */ in __acpi_thermal_trips_update()
331 tz->trips.active[i].trip.valid)) { in __acpi_thermal_trips_update()
335 tz->trips.active[i].trip.valid = false; in __acpi_thermal_trips_update()
343 tz->trips.active[0].trip.temperature = in __acpi_thermal_trips_update()
348 * the next higher trip point in __acpi_thermal_trips_update()
350 tz->trips.active[i-1].trip.temperature = in __acpi_thermal_trips_update()
352 tz->trips.active[i-2].trip.temperature, in __acpi_thermal_trips_update()
357 tz->trips.active[i].trip.temperature = tmp; in __acpi_thermal_trips_update()
358 tz->trips.active[i].trip.valid = true; in __acpi_thermal_trips_update()
363 if ((flag & ACPI_TRIPS_DEVICES) && tz->trips.active[i].trip.valid) { in __acpi_thermal_trips_update()
370 tz->trips.active[i].trip.valid = false; in __acpi_thermal_trips_update()
372 tz->trips.active[i].trip.valid = true; in __acpi_thermal_trips_update()
383 if (valid != tz->trips.active[i].trip.valid) in __acpi_thermal_trips_update()
386 if (!tz->trips.active[i].trip.valid) in __acpi_thermal_trips_update()
402 static int acpi_thermal_adjust_trip(struct thermal_trip *trip, void *data) in acpi_thermal_adjust_trip() argument
404 struct acpi_thermal_trip *acpi_trip = trip->priv; in acpi_thermal_adjust_trip()
411 trip->temperature = acpi_thermal_temp(tz, acpi_trip->temperature); in acpi_thermal_adjust_trip()
413 trip->temperature = THERMAL_TEMP_INVALID; in acpi_thermal_adjust_trip()
441 * Use thermal_zone_device_exec() to carry out the trip points in acpi_thermal_trips_update()
443 * trip point temperatures and to prevent thermal_zone_device_update() in acpi_thermal_trips_update()
463 tz->trips.passive.trip.valid; in acpi_thermal_get_trip_points()
466 valid = valid || tz->trips.active[i].trip.valid; in acpi_thermal_get_trip_points()
469 pr_warn(FW_BUG "No valid trip found\n"); in acpi_thermal_get_trip_points()
495 const struct thermal_trip *trip, in thermal_get_trend() argument
502 if (!tz || !trip) in thermal_get_trend()
505 acpi_trip = trip->priv; in thermal_get_trend()
509 switch (trip->type) { in thermal_get_trend()
526 if (t <= trip->temperature) in thermal_get_trend()
570 int trip = -1; in acpi_thermal_cooling_device_cb() local
574 trip++; in acpi_thermal_cooling_device_cb()
577 trip++; in acpi_thermal_cooling_device_cb()
579 if (tz->trips.passive.trip.valid) { in acpi_thermal_cooling_device_cb()
580 trip++; in acpi_thermal_cooling_device_cb()
589 thermal, trip, cdev, in acpi_thermal_cooling_device_cb()
596 thermal, trip, cdev); in acpi_thermal_cooling_device_cb()
604 if (!tz->trips.active[i].trip.valid) in acpi_thermal_cooling_device_cb()
607 trip++; in acpi_thermal_cooling_device_cb()
616 thermal, trip, cdev, in acpi_thermal_cooling_device_cb()
622 thermal, trip, cdev); in acpi_thermal_cooling_device_cb()
685 struct thermal_trip *trip; in acpi_thermal_register_thermal_zone() local
697 if (tz->trips.passive.trip.valid) { in acpi_thermal_register_thermal_zone()
702 for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && tz->trips.active[i].trip.valid; i++) in acpi_thermal_register_thermal_zone()
705 trip = kcalloc(trip_count, sizeof(*trip), GFP_KERNEL); in acpi_thermal_register_thermal_zone()
706 if (!trip) in acpi_thermal_register_thermal_zone()
709 tz->trip_table = trip; in acpi_thermal_register_thermal_zone()
712 trip->type = THERMAL_TRIP_CRITICAL; in acpi_thermal_register_thermal_zone()
713 trip->temperature = acpi_thermal_temp(tz, tz->trips.critical.temperature); in acpi_thermal_register_thermal_zone()
714 trip++; in acpi_thermal_register_thermal_zone()
718 trip->type = THERMAL_TRIP_HOT; in acpi_thermal_register_thermal_zone()
719 trip->temperature = acpi_thermal_temp(tz, tz->trips.hot.temperature); in acpi_thermal_register_thermal_zone()
720 trip++; in acpi_thermal_register_thermal_zone()
723 acpi_trip = &tz->trips.passive.trip; in acpi_thermal_register_thermal_zone()
725 trip->type = THERMAL_TRIP_PASSIVE; in acpi_thermal_register_thermal_zone()
726 trip->temperature = acpi_thermal_temp(tz, acpi_trip->temperature); in acpi_thermal_register_thermal_zone()
727 trip->priv = acpi_trip; in acpi_thermal_register_thermal_zone()
728 trip++; in acpi_thermal_register_thermal_zone()
732 acpi_trip = &tz->trips.active[i].trip; in acpi_thermal_register_thermal_zone()
737 trip->type = THERMAL_TRIP_ACTIVE; in acpi_thermal_register_thermal_zone()
738 trip->temperature = acpi_thermal_temp(tz, acpi_trip->temperature); in acpi_thermal_register_thermal_zone()
739 trip->priv = acpi_trip; in acpi_thermal_register_thermal_zone()
740 trip++; in acpi_thermal_register_thermal_zone()
856 /* Get trip points [_CRT, _PSV, etc.] (required) */ in acpi_thermal_get_info()
887 * critical trip point with a value being a multiple of 0.5 degree Celsius.
1013 if (!tz->trips.active[i].trip.valid) in acpi_thermal_resume()
1051 pr_notice("%s detected: disabling all active thermal trip points\n", in thermal_act()
1058 pr_notice("%s detected: disabling all critical thermal trip point actions.\n", in thermal_nocrt()
1073 pr_notice("%s detected: disabling all passive thermal trip points\n", in thermal_psv()