1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ACPI_ACPI_THERMAL_H
3 #define __ACPI_ACPI_THERMAL_H
7 #define ACPI_THERMAL_MAGIC 's'
9 #define ACPI_THERMAL_GET_TRT_LEN _IOR(ACPI_THERMAL_MAGIC, 1, unsigned long)
10 #define ACPI_THERMAL_GET_ART_LEN _IOR(ACPI_THERMAL_MAGIC, 2, unsigned long)
11 #define ACPI_THERMAL_GET_TRT_COUNT _IOR(ACPI_THERMAL_MAGIC, 3, unsigned long)
12 #define ACPI_THERMAL_GET_ART_COUNT _IOR(ACPI_THERMAL_MAGIC, 4, unsigned long)
14 #define ACPI_THERMAL_GET_TRT _IOR(ACPI_THERMAL_MAGIC, 5, unsigned long)
15 #define ACPI_THERMAL_GET_ART _IOR(ACPI_THERMAL_MAGIC, 6, unsigned long)
18 * ACPI_THERMAL_GET_PSVT_COUNT = Number of PSVT entries
19 * ACPI_THERMAL_GET_PSVT_LEN = Total return data size (PSVT count x each
21 * ACPI_THERMAL_GET_PSVT = Get the data as an array of psvt_objects
23 #define ACPI_THERMAL_GET_PSVT_LEN _IOR(ACPI_THERMAL_MAGIC, 7, unsigned long)
24 #define ACPI_THERMAL_GET_PSVT_COUNT _IOR(ACPI_THERMAL_MAGIC, 8, unsigned long)
25 #define ACPI_THERMAL_GET_PSVT _IOR(ACPI_THERMAL_MAGIC, 9, unsigned long)
56 #define ACPI_NR_PSVT_ELEMENTS 12
57 #define ACPI_PSVT_CONTROL_KNOB 7
58 #define ACPI_LIMIT_STR_MAX_LEN 8
69 /* For limit_type = ACPI_TYPE_INTEGER */
71 /* For limit_type = ACPI_TYPE_STRING */
72 char string
[ACPI_LIMIT_STR_MAX_LEN
];
78 /* Spec calls this field reserved, so we borrow it for type info */
79 u64 control_knob_type
; /* ACPI_TYPE_STRING or ACPI_TYPE_INTEGER */
82 #define ACPI_NR_ART_ELEMENTS 13
86 char source_device
[8]; /* ACPI single name */
87 char target_device
[8]; /* ACPI single name */
102 u64 __data
[ACPI_NR_ART_ELEMENTS
];
107 char source_device
[8]; /* ACPI single name */
108 char target_device
[8]; /* ACPI single name */
118 char source_device
[8];
119 char target_device
[8];
127 char string
[ACPI_LIMIT_STR_MAX_LEN
];
132 u64 control_knob_type
;
134 u64 __data
[ACPI_NR_PSVT_ELEMENTS
];
138 int acpi_thermal_rel_misc_device_add(acpi_handle handle
);
139 int acpi_thermal_rel_misc_device_remove(acpi_handle handle
);
140 int acpi_parse_art(acpi_handle handle
, int *art_count
, struct art
**arts
,
142 int acpi_parse_trt(acpi_handle handle
, int *trt_count
, struct trt
**trts
,
146 #endif /* __ACPI_ACPI_THERMAL_H */