1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * int340x_thermal_zone.h
4 * Copyright (c) 2015, Intel Corporation.
7 #ifndef __INT340X_THERMAL_ZONE_H__
8 #define __INT340X_THERMAL_ZONE_H__
10 #include <acpi/acpi_lpat.h>
12 #define INT340X_THERMAL_MAX_ACT_TRIP_COUNT 10
20 struct int34x_thermal_zone
{
21 struct acpi_device
*adev
;
22 struct active_trip act_trips
[INT340X_THERMAL_MAX_ACT_TRIP_COUNT
];
23 unsigned long *aux_trips
;
31 struct thermal_zone_device
*zone
;
32 struct thermal_zone_device_ops
*override_ops
;
34 struct acpi_lpat_conversion_table
*lpat_table
;
37 struct int34x_thermal_zone
*int340x_thermal_zone_add(struct acpi_device
*,
38 struct thermal_zone_device_ops
*override_ops
);
39 void int340x_thermal_zone_remove(struct int34x_thermal_zone
*);
40 int int340x_thermal_read_trips(struct int34x_thermal_zone
*int34x_zone
);
42 static inline void int340x_thermal_zone_set_priv_data(
43 struct int34x_thermal_zone
*tzone
, void *priv_data
)
45 tzone
->priv_data
= priv_data
;
48 static inline void *int340x_thermal_zone_get_priv_data(
49 struct int34x_thermal_zone
*tzone
)
51 return tzone
->priv_data
;
54 static inline void int340x_thermal_zone_device_update(
55 struct int34x_thermal_zone
*tzone
,
56 enum thermal_notify_event event
)
58 thermal_zone_device_update(tzone
->zone
, event
);