diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h new file mode 100644 index 00000000..994cd5b7 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef _GPMUIFTHERMSENSOR_H_ | ||
24 | #define _GPMUIFTHERMSENSOR_H_ | ||
25 | |||
26 | #include "ctrl/ctrltherm.h" | ||
27 | #include "gpmuifboardobj.h" | ||
28 | #include <nvgpu/flcnif_cmn.h> | ||
29 | |||
30 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00 | ||
31 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01 | ||
32 | |||
33 | #define NV_PMU_THERM_CMD_ID_BOARDOBJ_GRP_SET 0x0000000B | ||
34 | #define NV_PMU_THERM_MSG_ID_BOARDOBJ_GRP_SET 0x00000008 | ||
35 | |||
36 | struct nv_pmu_therm_therm_device_boardobjgrp_set_header { | ||
37 | struct nv_pmu_boardobjgrp_e32 super; | ||
38 | }; | ||
39 | |||
40 | struct nv_pmu_therm_therm_device_boardobj_set { | ||
41 | struct nv_pmu_boardobj super; | ||
42 | }; | ||
43 | |||
44 | struct nv_pmu_therm_therm_device_i2c_boardobj_set { | ||
45 | struct nv_pmu_therm_therm_device_boardobj_set super; | ||
46 | u8 i2c_dev_idx; | ||
47 | }; | ||
48 | |||
49 | union nv_pmu_therm_therm_device_boardobj_set_union { | ||
50 | struct nv_pmu_boardobj board_obj; | ||
51 | struct nv_pmu_therm_therm_device_boardobj_set therm_device; | ||
52 | struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c; | ||
53 | }; | ||
54 | |||
55 | NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device); | ||
56 | |||
57 | struct nv_pmu_therm_therm_channel_boardobjgrp_set_header { | ||
58 | struct nv_pmu_boardobjgrp_e32 super; | ||
59 | }; | ||
60 | |||
61 | struct nv_pmu_therm_therm_channel_boardobj_set { | ||
62 | struct nv_pmu_boardobj super; | ||
63 | s16 scaling; | ||
64 | s16 offset; | ||
65 | s32 temp_min; | ||
66 | s32 temp_max; | ||
67 | }; | ||
68 | |||
69 | struct nv_pmu_therm_therm_channel_device_boardobj_set { | ||
70 | struct nv_pmu_therm_therm_channel_boardobj_set super; | ||
71 | u8 therm_dev_idx; | ||
72 | u8 therm_dev_prov_idx; | ||
73 | }; | ||
74 | |||
75 | union nv_pmu_therm_therm_channel_boardobj_set_union { | ||
76 | struct nv_pmu_boardobj board_obj; | ||
77 | struct nv_pmu_therm_therm_channel_boardobj_set therm_channel; | ||
78 | struct nv_pmu_therm_therm_channel_device_boardobj_set device; | ||
79 | }; | ||
80 | |||
81 | NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_channel); | ||
82 | |||
83 | #endif | ||