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
13 #define INT340X_THERMAL_MAX_TRIP_COUNT INT340X_THERMAL_MAX_ACT_TRIP_COUNT + 3
21 struct int34x_thermal_zone {
22 struct acpi_device *adev;
24 struct thermal_zone_device *zone;
26 struct acpi_lpat_conversion_table *lpat_table;
29 struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *,
30 int (*get_temp) (struct thermal_zone_device *, int *));
31 void int340x_thermal_zone_remove(struct int34x_thermal_zone *);
32 void int340x_thermal_update_trips(struct int34x_thermal_zone *int34x_zone);
34 static inline void int340x_thermal_zone_set_priv_data(
35 struct int34x_thermal_zone *tzone, void *priv_data)
37 tzone->priv_data = priv_data;
40 static inline void *int340x_thermal_zone_get_priv_data(
41 struct int34x_thermal_zone *tzone)
43 return tzone->priv_data;
46 static inline void int340x_thermal_zone_device_update(
47 struct int34x_thermal_zone *tzone,
48 enum thermal_notify_event event)
50 thermal_zone_device_update(tzone->zone, event);