diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h | 74 |
1 files changed, 74 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..d240b344 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2017, 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 "ctrl/ctrltherm.h" | ||
18 | #include "gpmuifboardobj.h" | ||
19 | #include <nvgpu/flcnif_cmn.h> | ||
20 | |||
21 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_DEVICE 0x00 | ||
22 | #define NV_PMU_THERM_BOARDOBJGRP_CLASS_ID_THERM_CHANNEL 0x01 | ||
23 | |||
24 | #define NV_PMU_THERM_CMD_ID_BOARDOBJ_GRP_SET 0x0000000B | ||
25 | #define NV_PMU_THERM_MSG_ID_BOARDOBJ_GRP_SET 0x00000008 | ||
26 | |||
27 | struct nv_pmu_therm_therm_device_boardobjgrp_set_header { | ||
28 | struct nv_pmu_boardobjgrp_e32 super; | ||
29 | }; | ||
30 | |||
31 | struct nv_pmu_therm_therm_device_boardobj_set { | ||
32 | struct nv_pmu_boardobj super; | ||
33 | }; | ||
34 | |||
35 | struct nv_pmu_therm_therm_device_i2c_boardobj_set { | ||
36 | struct nv_pmu_therm_therm_device_boardobj_set super; | ||
37 | u8 i2c_dev_idx; | ||
38 | }; | ||
39 | |||
40 | union nv_pmu_therm_therm_device_boardobj_set_union { | ||
41 | struct nv_pmu_boardobj board_obj; | ||
42 | struct nv_pmu_therm_therm_device_boardobj_set therm_device; | ||
43 | struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c; | ||
44 | }; | ||
45 | |||
46 | NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device); | ||
47 | |||
48 | struct nv_pmu_therm_therm_channel_boardobjgrp_set_header { | ||
49 | struct nv_pmu_boardobjgrp_e32 super; | ||
50 | }; | ||
51 | |||
52 | struct nv_pmu_therm_therm_channel_boardobj_set { | ||
53 | struct nv_pmu_boardobj super; | ||
54 | s16 scaling; | ||
55 | s16 offset; | ||
56 | s32 temp_min; | ||
57 | s32 temp_max; | ||
58 | }; | ||
59 | |||
60 | struct nv_pmu_therm_therm_channel_device_boardobj_set { | ||
61 | struct nv_pmu_therm_therm_channel_boardobj_set super; | ||
62 | u8 therm_dev_idx; | ||
63 | u8 therm_dev_prov_idx; | ||
64 | }; | ||
65 | |||
66 | union nv_pmu_therm_therm_channel_boardobj_set_union { | ||
67 | struct nv_pmu_boardobj board_obj; | ||
68 | struct nv_pmu_therm_therm_channel_boardobj_set therm_channel; | ||
69 | struct nv_pmu_therm_therm_channel_device_boardobj_set device; | ||
70 | }; | ||
71 | |||
72 | NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_channel); | ||
73 | |||
74 | #endif | ||