Merge branches 'for-4.8/alps', 'for-4.8/apple', 'for-4.8/i2c-hid', 'for-4.8/uhid...
[deliverable/linux.git] / drivers / thermal / int340x_thermal / int340x_thermal_zone.h
CommitLineData
5fbf7f27
SP
1/*
2 * int340x_thermal_zone.h
3 * Copyright (c) 2015, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 */
15
16#ifndef __INT340X_THERMAL_ZONE_H__
17#define __INT340X_THERMAL_ZONE_H__
18
317d9dda
SP
19#include <acpi/acpi_lpat.h>
20
5fbf7f27
SP
21#define INT340X_THERMAL_MAX_ACT_TRIP_COUNT 10
22
23struct active_trip {
17e8351a 24 int temp;
5fbf7f27
SP
25 int id;
26 bool valid;
27};
28
29struct int34x_thermal_zone {
30 struct acpi_device *adev;
31 struct active_trip act_trips[INT340X_THERMAL_MAX_ACT_TRIP_COUNT];
32 unsigned long *aux_trips;
33 int aux_trip_nr;
17e8351a 34 int psv_temp;
5fbf7f27 35 int psv_trip_id;
17e8351a 36 int crt_temp;
5fbf7f27 37 int crt_trip_id;
17e8351a 38 int hot_temp;
5fbf7f27
SP
39 int hot_trip_id;
40 struct thermal_zone_device *zone;
41 struct thermal_zone_device_ops *override_ops;
42 void *priv_data;
317d9dda 43 struct acpi_lpat_conversion_table *lpat_table;
5fbf7f27
SP
44};
45
46struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *,
47 struct thermal_zone_device_ops *override_ops);
48void int340x_thermal_zone_remove(struct int34x_thermal_zone *);
49
50static inline void int340x_thermal_zone_set_priv_data(
51 struct int34x_thermal_zone *tzone, void *priv_data)
52{
53 tzone->priv_data = priv_data;
54}
55
56static inline void *int340x_thermal_zone_get_priv_data(
57 struct int34x_thermal_zone *tzone)
58{
59 return tzone->priv_data;
60}
61
62static inline void int340x_thermal_zone_device_update(
63 struct int34x_thermal_zone *tzone)
64{
65 thermal_zone_device_update(tzone->zone);
66}
67
68#endif
This page took 0.098052 seconds and 5 git commands to generate.