xref: /haiku/src/add-ons/kernel/drivers/power/acpi_thermal/acpi_thermal.h (revision 66581f37319cb169eb3095496869c7846731282d)
190200dfeSBryan Varner /* ++++++++++
290200dfeSBryan Varner      Public interface to the ACPI thermal device driver.
390200dfeSBryan Varner +++++ */
490200dfeSBryan Varner #ifndef _ACPI_THERMAL_H
590200dfeSBryan Varner #define _ACPI_THERMAL_H
690200dfeSBryan Varner 
790200dfeSBryan Varner #include <KernelExport.h>
890200dfeSBryan Varner #include <ACPI.h>
990200dfeSBryan Varner 
1090200dfeSBryan Varner enum { /* ioctl op-codes */
1190200dfeSBryan Varner 	drvOpGetThermalType = B_DEVICE_OP_CODES_END + 10001,
1290200dfeSBryan Varner };
1390200dfeSBryan Varner 
1490200dfeSBryan Varner 
1590200dfeSBryan Varner typedef struct acpi_thermal_active_object acpi_thermal_active_object;
1690200dfeSBryan Varner typedef struct acpi_thermal_type acpi_thermal_type;
1790200dfeSBryan Varner 
1890200dfeSBryan Varner struct acpi_thermal_type {
1990200dfeSBryan Varner 	/* Required fields for thermal devices */
2090200dfeSBryan Varner 	uint32 critical_temp;
2190200dfeSBryan Varner 	uint32 current_temp;
2290200dfeSBryan Varner 
2390200dfeSBryan Varner 	/* Optional HOT temp, S4 sleep threshold */
2490200dfeSBryan Varner 	uint32 hot_temp;
2590200dfeSBryan Varner 
26*abe0393bSBryan Varner 	/* acpi_objects_type evaluated from _PSL
27*abe0393bSBryan Varner 	   if != NULL, client must free()
28*abe0393bSBryan Varner 	*/
2990200dfeSBryan Varner 	acpi_object_type *passive_package;
3090200dfeSBryan Varner 
3190200dfeSBryan Varner 	/* List of acpi_thermal_active_objects that can actively manage this thermal device */
3290200dfeSBryan Varner 	uint32 active_count;
3390200dfeSBryan Varner 	acpi_thermal_active_object *active_devices;
3490200dfeSBryan Varner };
3590200dfeSBryan Varner 
3690200dfeSBryan Varner struct acpi_thermal_active_object {
3790200dfeSBryan Varner 	uint32 threshold_temp;
3890200dfeSBryan Varner 	acpi_object_type *active_package;
3990200dfeSBryan Varner };
4090200dfeSBryan Varner 
4190200dfeSBryan Varner #endif /* _ACPI_THERMAL_H */
42