summaryrefslogtreecommitdiff
path: root/drivers/thermal/tegra/tegra210-soctherm.c
diff options
context:
space:
mode:
authorWei Ni <wni@nvidia.com>2019-02-21 18:18:37 +0800
committerEduardo Valentin <edubezval@gmail.com>2019-05-13 20:35:32 -0700
commit2510aa56ab8795e541386c4f662d40c6c4e98ba9 (patch)
tree4ef83b4f184d11efa60f0a5369128c2f8a6f93b9 /drivers/thermal/tegra/tegra210-soctherm.c
parent9967a1bc8122e50cb2bb330b41bd982392314375 (diff)
thermal: tegra: support hw and sw shutdown
Currently the critical trip points in thermal framework are the only way to specify a temperature at which HW should shutdown. This is insufficient for certain platforms which would want an orderly software shutdown in addition to HW shutdown. This change support to parse "nvidia, thermtrips" property, it allows soctherm DT to specify thermtrip temperatures so that critical trip points framework can be used for doing software shutdown. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/tegra/tegra210-soctherm.c')
-rw-r--r--drivers/thermal/tegra/tegra210-soctherm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/thermal/tegra/tegra210-soctherm.c b/drivers/thermal/tegra/tegra210-soctherm.c
index ad53169a8e95..0a0c3cec7134 100644
--- a/drivers/thermal/tegra/tegra210-soctherm.c
+++ b/drivers/thermal/tegra/tegra210-soctherm.c
@@ -203,6 +203,13 @@ static const struct tegra_soctherm_fuse tegra210_soctherm_fuse = {
.fuse_spare_realignment = 0,
};
+struct tsensor_group_thermtrips tegra210_tsensor_thermtrips[] = {
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
+ {.id = TEGRA124_SOCTHERM_SENSOR_NUM},
+};
+
const struct tegra_soctherm_soc tegra210_soctherm = {
.tsensors = tegra210_tsensors,
.num_tsensors = ARRAY_SIZE(tegra210_tsensors),
@@ -212,4 +219,5 @@ const struct tegra_soctherm_soc tegra210_soctherm = {
.thresh_grain = TEGRA210_THRESH_GRAIN,
.bptt = TEGRA210_BPTT,
.use_ccroc = false,
+ .thermtrips = tegra210_tsensor_thermtrips,
};