hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/thermal/tegra/soctherm.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
34 *
....@@ -28,6 +29,14 @@
2829
2930 #define THERMCTL_THERMTRIP_CTL 0x80
3031 /* BITs are defined in device file */
32
+
33
+#define THERMCTL_INTR_ENABLE 0x88
34
+#define THERMCTL_INTR_DISABLE 0x8c
35
+#define TH_INTR_UP_DN_EN 0x3
36
+#define THERM_IRQ_MEM_MASK (TH_INTR_UP_DN_EN << 24)
37
+#define THERM_IRQ_GPU_MASK (TH_INTR_UP_DN_EN << 16)
38
+#define THERM_IRQ_CPU_MASK (TH_INTR_UP_DN_EN << 8)
39
+#define THERM_IRQ_TSENSE_MASK (TH_INTR_UP_DN_EN << 0)
3140
3241 #define SENSOR_PDIV 0x1c0
3342 #define SENSOR_PDIV_CPU_MASK (0xf << 12)
....@@ -70,6 +79,7 @@
7079 u32 thermtrip_enable_mask;
7180 u32 thermtrip_any_en_mask;
7281 u32 thermtrip_threshold_mask;
82
+ u32 thermctl_isr_mask;
7383 u16 thermctl_lvl0_offset;
7484 u32 thermctl_lvl0_up_thresh_mask;
7585 u32 thermctl_lvl0_dn_thresh_mask;
....@@ -90,6 +100,11 @@
90100 */
91101 const s32 fuse_corr_alpha, fuse_corr_beta;
92102 const struct tegra_tsensor_group *group;
103
+};
104
+
105
+struct tsensor_group_thermtrips {
106
+ u8 id;
107
+ u32 temp;
93108 };
94109
95110 struct tegra_soctherm_fuse {
....@@ -113,6 +128,7 @@
113128 const int thresh_grain;
114129 const unsigned int bptt;
115130 const bool use_ccroc;
131
+ struct tsensor_group_thermtrips *thermtrips;
116132 };
117133
118134 int tegra_calc_shared_calib(const struct tegra_soctherm_fuse *tfuse,