summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2013-08-08 13:20:40 -0400
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:00:16 -0600
commit5b2fedde1e8612ccd020498a003d11d1aaf54adf (patch)
tree601c9c396bf836b149676cb5755b0732f9e8691d /include/linux
parenta3a7d0a359b046f739f624a54af88b05724a33bb (diff)
MLK-11485 thermal: add device cooling for thermal driver
this patch is chery-picked from imx_3.14.y (cherry picked from commit 51e376b469c) ENGR00274056-1 thermal: add device cooling for thermal driver cpu cooling is not enough when temperature is too hot, as some devices may contribute a lot of heat to SOC, such as GPU, so we need to add device cooling as well, when system is too hot, devices can also take their actions to lower SOC temperature. when temperature cross the passive trip, device cooling driver will send out notification, those devices who register this devfreq_cooling notification will take actions to lower SOC temperature. Signed-off-by: Anson Huang <b20788@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Bai Ping <b51503@freescale.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device_cooling.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/linux/device_cooling.h b/include/linux/device_cooling.h
new file mode 100644
index 000000000000..18d9e3b90ed9
--- /dev/null
+++ b/include/linux/device_cooling.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DEVICE_THERMAL_H__
+#define __DEVICE_THERMAL_H__
+
+#include <linux/thermal.h>
+
+#ifdef CONFIG_DEVICE_THERMAL
+int register_devfreq_cooling_notifier(struct notifier_block *nb);
+int unregister_devfreq_cooling_notifier(struct notifier_block *nb);
+struct thermal_cooling_device *devfreq_cooling_register(void);
+void devfreq_cooling_unregister(struct thermal_cooling_device *cdev);
+#else
+static inline
+int register_devfreq_cooling_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+
+static inline
+int unregister_devfreq_cooling_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+
+static inline
+struct thermal_cooling_device *devfreq_cooling_register(void)
+{
+ return NULL;
+}
+
+static inline
+void devfreq_cooling_unregister(struct thermal_cooling_device *cdev)
+{
+ return;
+}
+#endif
+#endif /* __DEVICE_THERMAL_H__ */