summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/tegra/soctherm.h
diff options
context:
space:
mode:
authorWei Ni <wni@nvidia.com>2019-02-21 11:18:37 +0100
committerEduardo Valentin <edubezval@gmail.com>2019-05-14 05:35:32 +0200
commit2510aa56ab8795e541386c4f662d40c6c4e98ba9 (patch)
tree4ef83b4f184d11efa60f0a5369128c2f8a6f93b9 /drivers/thermal/tegra/soctherm.h
parentof: Add bindings of thermtrip for Tegra soctherm (diff)
downloadlinux-2510aa56ab8795e541386c4f662d40c6c4e98ba9.tar.xz
linux-2510aa56ab8795e541386c4f662d40c6c4e98ba9.zip
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/soctherm.h')
-rw-r--r--drivers/thermal/tegra/soctherm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/thermal/tegra/soctherm.h b/drivers/thermal/tegra/soctherm.h
index e96ca73fd780..c05c7e37e968 100644
--- a/drivers/thermal/tegra/soctherm.h
+++ b/drivers/thermal/tegra/soctherm.h
@@ -92,6 +92,11 @@ struct tegra_tsensor {
const struct tegra_tsensor_group *group;
};
+struct tsensor_group_thermtrips {
+ u8 id;
+ u32 temp;
+};
+
struct tegra_soctherm_fuse {
u32 fuse_base_cp_mask, fuse_base_cp_shift;
u32 fuse_base_ft_mask, fuse_base_ft_shift;
@@ -113,6 +118,7 @@ struct tegra_soctherm_soc {
const int thresh_grain;
const unsigned int bptt;
const bool use_ccroc;
+ struct tsensor_group_thermtrips *thermtrips;
};
int tegra_calc_shared_calib(const struct tegra_soctherm_fuse *tfuse,