|
40 | 40 | #define ACPI_THERMAL_NOTIFY_HOT 0xF1
|
41 | 41 | #define ACPI_THERMAL_MODE_ACTIVE 0x00
|
42 | 42 |
|
43 |
| -#define ACPI_THERMAL_MAX_ACTIVE 10 |
44 |
| -#define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65 |
| 43 | +#define ACPI_THERMAL_MAX_ACTIVE 10 |
| 44 | +#define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65 |
| 45 | + |
| 46 | +#define ACPI_TRIPS_CRITICAL BIT(0) |
| 47 | +#define ACPI_TRIPS_HOT BIT(1) |
| 48 | +#define ACPI_TRIPS_PASSIVE BIT(2) |
| 49 | +#define ACPI_TRIPS_ACTIVE BIT(3) |
| 50 | +#define ACPI_TRIPS_DEVICES BIT(4) |
| 51 | + |
| 52 | +#define ACPI_TRIPS_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE) |
| 53 | + |
| 54 | +#define ACPI_TRIPS_INIT (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \ |
| 55 | + ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \ |
| 56 | + ACPI_TRIPS_DEVICES) |
| 57 | + |
| 58 | +/* |
| 59 | + * This exception is thrown out in two cases: |
| 60 | + * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid |
| 61 | + * when re-evaluating the AML code. |
| 62 | + * 2.TODO: Devices listed in _PSL, _ALx, _TZD may change. |
| 63 | + * We need to re-bind the cooling devices of a thermal zone when this occurs. |
| 64 | + */ |
| 65 | +#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \ |
| 66 | +do { \ |
| 67 | + if (flags != ACPI_TRIPS_INIT) \ |
| 68 | + acpi_handle_info(tz->device->handle, \ |
| 69 | + "ACPI thermal trip point %s changed\n" \ |
| 70 | + "Please report to [email protected]\n", str); \ |
| 71 | +} while (0) |
45 | 72 |
|
46 | 73 | MODULE_AUTHOR("Paul Diefenbaugh");
|
47 | 74 | MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
|
@@ -232,33 +259,6 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
|
232 | 259 | return 0;
|
233 | 260 | }
|
234 | 261 |
|
235 |
| -#define ACPI_TRIPS_CRITICAL BIT(0) |
236 |
| -#define ACPI_TRIPS_HOT BIT(1) |
237 |
| -#define ACPI_TRIPS_PASSIVE BIT(2) |
238 |
| -#define ACPI_TRIPS_ACTIVE BIT(3) |
239 |
| -#define ACPI_TRIPS_DEVICES BIT(4) |
240 |
| - |
241 |
| -#define ACPI_TRIPS_THRESHOLDS (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE) |
242 |
| - |
243 |
| -#define ACPI_TRIPS_INIT (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \ |
244 |
| - ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \ |
245 |
| - ACPI_TRIPS_DEVICES) |
246 |
| - |
247 |
| -/* |
248 |
| - * This exception is thrown out in two cases: |
249 |
| - * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid |
250 |
| - * when re-evaluating the AML code. |
251 |
| - * 2.TODO: Devices listed in _PSL, _ALx, _TZD may change. |
252 |
| - * We need to re-bind the cooling devices of a thermal zone when this occurs. |
253 |
| - */ |
254 |
| -#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \ |
255 |
| -do { \ |
256 |
| - if (flags != ACPI_TRIPS_INIT) \ |
257 |
| - acpi_handle_info(tz->device->handle, \ |
258 |
| - "ACPI thermal trip point %s changed\n" \ |
259 |
| - "Please report to [email protected]\n", str); \ |
260 |
| -} while (0) |
261 |
| - |
262 | 262 | static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
263 | 263 | {
|
264 | 264 | acpi_status status;
|
|
0 commit comments