summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h')
-rw-r--r--drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h b/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h
new file mode 100644
index 00000000..498661b3
--- /dev/null
+++ b/drivers/gpu/nvgpu/pmuif/gpmuifthermsensor.h
@@ -0,0 +1,77 @@
1/*
2* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3*
4* This program is free software; you can redistribute it and/or modify it
5* under the terms and conditions of the GNU General Public License,
6* version 2, as published by the Free Software Foundation.
7*
8* This program is distributed in the hope it will be useful, but WITHOUT
9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11* more details.
12*/
13
14#ifndef _GPMUIFTHERMSENSOR_H_
15#define _GPMUIFTHERMSENSOR_H_
16
17#include "gk20a/gk20a.h"
18#include "gk20a/pmu_gk20a.h"
19#include "ctrl/ctrltherm.h"
20#include "pmuif/gpmuifboardobj.h"
21#include "gk20a/pmu_common.h"
22
23#define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00
24#define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01
25
26#define NV_PMU_THERM_CMD_ID_BOARDOBJ_GRP_SET 0x0000000B
27#define NV_PMU_THERM_MSG_ID_BOARDOBJ_GRP_SET 0x00000008
28
29struct nv_pmu_therm_therm_device_boardobjgrp_set_header {
30 struct nv_pmu_boardobjgrp_e32 super;
31};
32
33struct nv_pmu_therm_therm_device_boardobj_set {
34 struct nv_pmu_boardobj super;
35};
36
37struct nv_pmu_therm_therm_device_i2c_boardobj_set {
38 struct nv_pmu_therm_therm_device_boardobj_set super;
39 u8 i2c_dev_idx;
40};
41
42union nv_pmu_therm_therm_device_boardobj_set_union {
43 struct nv_pmu_boardobj board_obj;
44 struct nv_pmu_therm_therm_device_boardobj_set therm_device;
45 struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c;
46};
47
48NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device);
49
50struct nv_pmu_therm_therm_channel_boardobjgrp_set_header {
51 struct nv_pmu_boardobjgrp_e32 super;
52};
53
54struct nv_pmu_therm_therm_channel_boardobj_set {
55 struct nv_pmu_boardobj super;
56 s16 scaling;
57 s16 offset;
58 s32 temp_min;
59 s32 temp_max;
60};
61
62struct nv_pmu_therm_therm_channel_device_boardobj_set {
63 struct nv_pmu_therm_therm_channel_boardobj_set super;
64 u8 therm_dev_idx;
65 u8 therm_dev_prov_idx;
66};
67
68union nv_pmu_therm_therm_channel_boardobj_set_union {
69 struct nv_pmu_boardobj board_obj;
70 struct nv_pmu_therm_therm_channel_boardobj_set therm_channel;
71 struct nv_pmu_therm_therm_channel_device_boardobj_set device;
72};
73
74NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_channel);
75
76#endif
77