+ /* Set the cooling mode [_SCP] to active cooling (default) */
+ result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE);
+ if (!result)
+ tz->flags.cooling_mode = 1;
+ else {
+ /* Oh,we have not _SCP method.
+ Generally show cooling_mode by _ACx, _PSV,spec 12.2*/
+ tz->flags.cooling_mode = 0;
+ if ( tz->trips.active[0].flags.valid && tz->trips.passive.flags.valid ) {
+ if ( tz->trips.passive.temperature > tz->trips.active[0].temperature )
+ tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE;
+ else
+ tz->cooling_mode = ACPI_THERMAL_MODE_PASSIVE;
+ } else if ( !tz->trips.active[0].flags.valid && tz->trips.passive.flags.valid ) {
+ tz->cooling_mode = ACPI_THERMAL_MODE_PASSIVE;
+ } else if ( tz->trips.active[0].flags.valid && !tz->trips.passive.flags.valid ) {
+ tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE;
+ } else {
+ /* _ACx and _PSV are optional, but _CRT is required */
+ tz->cooling_mode = ACPI_THERMAL_MODE_CRT;
+ }
+ }
+