aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt (renamed from drivers/staging/ti-soc-thermal/ti_soc_thermal.txt)0
-rw-r--r--MAINTAINERS4
-rw-r--r--drivers/staging/Kconfig2
-rw-r--r--drivers/staging/Makefile1
-rw-r--r--drivers/thermal/Kconfig3
-rw-r--r--drivers/thermal/Makefile2
-rw-r--r--drivers/thermal/armada_thermal.c3
-rw-r--r--drivers/thermal/dove_thermal.c3
-rw-r--r--drivers/thermal/exynos_thermal.c3
-rw-r--r--drivers/thermal/kirkwood_thermal.c3
-rw-r--r--drivers/thermal/rcar_thermal.c4
-rw-r--r--drivers/thermal/spear_thermal.c3
-rw-r--r--drivers/thermal/thermal_core.c8
-rw-r--r--drivers/thermal/ti-soc-thermal/Kconfig (renamed from drivers/staging/ti-soc-thermal/Kconfig)0
-rw-r--r--drivers/thermal/ti-soc-thermal/Makefile (renamed from drivers/staging/ti-soc-thermal/Makefile)0
-rw-r--r--drivers/thermal/ti-soc-thermal/TODO (renamed from drivers/staging/ti-soc-thermal/TODO)0
-rw-r--r--drivers/thermal/ti-soc-thermal/omap4-thermal-data.c (renamed from drivers/staging/ti-soc-thermal/omap4-thermal-data.c)0
-rw-r--r--drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h (renamed from drivers/staging/ti-soc-thermal/omap4xxx-bandgap.h)0
-rw-r--r--drivers/thermal/ti-soc-thermal/omap5-thermal-data.c (renamed from drivers/staging/ti-soc-thermal/omap5-thermal-data.c)0
-rw-r--r--drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h (renamed from drivers/staging/ti-soc-thermal/omap5xxx-bandgap.h)0
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-bandgap.c (renamed from drivers/staging/ti-soc-thermal/ti-bandgap.c)0
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-bandgap.h (renamed from drivers/staging/ti-soc-thermal/ti-bandgap.h)0
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-thermal-common.c (renamed from drivers/staging/ti-soc-thermal/ti-thermal-common.c)0
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-thermal.h (renamed from drivers/staging/ti-soc-thermal/ti-thermal.h)0
24 files changed, 17 insertions, 22 deletions
diff --git a/drivers/staging/ti-soc-thermal/ti_soc_thermal.txt b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
index a4a33d1a0746..a4a33d1a0746 100644
--- a/drivers/staging/ti-soc-thermal/ti_soc_thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
diff --git a/MAINTAINERS b/MAINTAINERS
index 3d7782b9f90d..311fb4512826 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8056,8 +8056,8 @@ F: drivers/platform/x86/thinkpad_acpi.c
8056TI BANDGAP AND THERMAL DRIVER 8056TI BANDGAP AND THERMAL DRIVER
8057M: Eduardo Valentin <eduardo.valentin@ti.com> 8057M: Eduardo Valentin <eduardo.valentin@ti.com>
8058L: linux-pm@vger.kernel.org 8058L: linux-pm@vger.kernel.org
8059S: Maintained 8059S: Supported
8060F: drivers/staging/omap-thermal/ 8060F: drivers/thermal/ti-soc-thermal/
8061 8061
8062TI FLASH MEDIA INTERFACE DRIVER 8062TI FLASH MEDIA INTERFACE DRIVER
8063M: Alex Dubov <oakad@yahoo.com> 8063M: Alex Dubov <oakad@yahoo.com>
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 4e8a1794f50a..79701de74855 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -118,8 +118,6 @@ source "drivers/staging/gdm72xx/Kconfig"
118 118
119source "drivers/staging/csr/Kconfig" 119source "drivers/staging/csr/Kconfig"
120 120
121source "drivers/staging/ti-soc-thermal/Kconfig"
122
123source "drivers/staging/silicom/Kconfig" 121source "drivers/staging/silicom/Kconfig"
124 122
125source "drivers/staging/ced1401/Kconfig" 123source "drivers/staging/ced1401/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 415772ea306d..f8b740c4ea7e 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -52,7 +52,6 @@ obj-$(CONFIG_ANDROID) += android/
52obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/ 52obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/
53obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/ 53obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/
54obj-$(CONFIG_CSR_WIFI) += csr/ 54obj-$(CONFIG_CSR_WIFI) += csr/
55obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/
56obj-$(CONFIG_NET_VENDOR_SILICOM) += silicom/ 55obj-$(CONFIG_NET_VENDOR_SILICOM) += silicom/
57obj-$(CONFIG_CED1401) += ced1401/ 56obj-$(CONFIG_CED1401) += ced1401/
58obj-$(CONFIG_DRM_IMX) += imx-drm/ 57obj-$(CONFIG_DRM_IMX) += imx-drm/
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 5e3c02554d99..7205c70a46a3 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -169,4 +169,7 @@ config INTEL_POWERCLAMP
169 enforce idle time which results in more package C-state residency. The 169 enforce idle time which results in more package C-state residency. The
170 user interface is exposed via generic thermal framework. 170 user interface is exposed via generic thermal framework.
171 171
172menu "Texas Instruments thermal drivers"
173source "drivers/thermal/ti-soc-thermal/Kconfig"
174endmenu
172endif 175endif
diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index c054d410ac3f..85693941fda0 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -23,4 +23,4 @@ obj-$(CONFIG_DB8500_THERMAL) += db8500_thermal.o
23obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o 23obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o
24obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o 24obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o
25obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o 25obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o
26 26obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 54ffd64ca3f7..5e53212b984f 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -200,7 +200,6 @@ static int armada_thermal_exit(struct platform_device *pdev)
200 platform_get_drvdata(pdev); 200 platform_get_drvdata(pdev);
201 201
202 thermal_zone_device_unregister(armada_thermal); 202 thermal_zone_device_unregister(armada_thermal);
203 platform_set_drvdata(pdev, NULL);
204 203
205 return 0; 204 return 0;
206} 205}
@@ -211,7 +210,7 @@ static struct platform_driver armada_thermal_driver = {
211 .driver = { 210 .driver = {
212 .name = "armada_thermal", 211 .name = "armada_thermal",
213 .owner = THIS_MODULE, 212 .owner = THIS_MODULE,
214 .of_match_table = of_match_ptr(armada_thermal_id_table), 213 .of_match_table = armada_thermal_id_table,
215 }, 214 },
216}; 215};
217 216
diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c
index 8bf104d8a649..828f5e345c30 100644
--- a/drivers/thermal/dove_thermal.c
+++ b/drivers/thermal/dove_thermal.c
@@ -173,7 +173,6 @@ static int dove_thermal_exit(struct platform_device *pdev)
173 platform_get_drvdata(pdev); 173 platform_get_drvdata(pdev);
174 174
175 thermal_zone_device_unregister(dove_thermal); 175 thermal_zone_device_unregister(dove_thermal);
176 platform_set_drvdata(pdev, NULL);
177 176
178 return 0; 177 return 0;
179} 178}
@@ -186,7 +185,7 @@ static struct platform_driver dove_thermal_driver = {
186 .driver = { 185 .driver = {
187 .name = "dove_thermal", 186 .name = "dove_thermal",
188 .owner = THIS_MODULE, 187 .owner = THIS_MODULE,
189 .of_match_table = of_match_ptr(dove_thermal_id_table), 188 .of_match_table = dove_thermal_id_table,
190 }, 189 },
191}; 190};
192 191
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index 788b1ddcac6c..03e4bbc08bf0 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -996,7 +996,6 @@ static int exynos_tmu_probe(struct platform_device *pdev)
996 996
997 return 0; 997 return 0;
998err_clk: 998err_clk:
999 platform_set_drvdata(pdev, NULL);
1000 clk_unprepare(data->clk); 999 clk_unprepare(data->clk);
1001 return ret; 1000 return ret;
1002} 1001}
@@ -1011,8 +1010,6 @@ static int exynos_tmu_remove(struct platform_device *pdev)
1011 1010
1012 clk_unprepare(data->clk); 1011 clk_unprepare(data->clk);
1013 1012
1014 platform_set_drvdata(pdev, NULL);
1015
1016 return 0; 1013 return 0;
1017} 1014}
1018 1015
diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c
index 9e4d98eef17a..3b034a0dfc94 100644
--- a/drivers/thermal/kirkwood_thermal.c
+++ b/drivers/thermal/kirkwood_thermal.c
@@ -103,7 +103,6 @@ static int kirkwood_thermal_exit(struct platform_device *pdev)
103 platform_get_drvdata(pdev); 103 platform_get_drvdata(pdev);
104 104
105 thermal_zone_device_unregister(kirkwood_thermal); 105 thermal_zone_device_unregister(kirkwood_thermal);
106 platform_set_drvdata(pdev, NULL);
107 106
108 return 0; 107 return 0;
109} 108}
@@ -116,7 +115,7 @@ static struct platform_driver kirkwood_thermal_driver = {
116 .driver = { 115 .driver = {
117 .name = "kirkwood_thermal", 116 .name = "kirkwood_thermal",
118 .owner = THIS_MODULE, 117 .owner = THIS_MODULE,
119 .of_match_table = of_match_ptr(kirkwood_thermal_id_table), 118 .of_match_table = kirkwood_thermal_id_table,
120 }, 119 },
121}; 120};
122 121
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 72f50bc0456c..88f92e1a9944 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -454,7 +454,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
454 454
455 platform_set_drvdata(pdev, common); 455 platform_set_drvdata(pdev, common);
456 456
457 dev_info(dev, "%d sensor proved\n", i); 457 dev_info(dev, "%d sensor probed\n", i);
458 458
459 return 0; 459 return 0;
460 460
@@ -483,8 +483,6 @@ static int rcar_thermal_remove(struct platform_device *pdev)
483 rcar_thermal_irq_disable(priv); 483 rcar_thermal_irq_disable(priv);
484 } 484 }
485 485
486 platform_set_drvdata(pdev, NULL);
487
488 pm_runtime_put_sync(dev); 486 pm_runtime_put_sync(dev);
489 pm_runtime_disable(dev); 487 pm_runtime_disable(dev);
490 488
diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c
index 0f37c7279c96..ab79ea4701d9 100644
--- a/drivers/thermal/spear_thermal.c
+++ b/drivers/thermal/spear_thermal.c
@@ -167,7 +167,6 @@ static int spear_thermal_exit(struct platform_device *pdev)
167 struct spear_thermal_dev *stdev = spear_thermal->devdata; 167 struct spear_thermal_dev *stdev = spear_thermal->devdata;
168 168
169 thermal_zone_device_unregister(spear_thermal); 169 thermal_zone_device_unregister(spear_thermal);
170 platform_set_drvdata(pdev, NULL);
171 170
172 /* Disable SPEAr Thermal Sensor */ 171 /* Disable SPEAr Thermal Sensor */
173 actual_mask = readl_relaxed(stdev->thermal_base); 172 actual_mask = readl_relaxed(stdev->thermal_base);
@@ -191,7 +190,7 @@ static struct platform_driver spear_thermal_driver = {
191 .name = "spear_thermal", 190 .name = "spear_thermal",
192 .owner = THIS_MODULE, 191 .owner = THIS_MODULE,
193 .pm = &spear_thermal_pm_ops, 192 .pm = &spear_thermal_pm_ops,
194 .of_match_table = of_match_ptr(spear_thermal_id_table), 193 .of_match_table = spear_thermal_id_table,
195 }, 194 },
196}; 195};
197 196
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index d755440791b7..e56ded5984b5 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -33,6 +33,7 @@
33#include <linux/idr.h> 33#include <linux/idr.h>
34#include <linux/thermal.h> 34#include <linux/thermal.h>
35#include <linux/reboot.h> 35#include <linux/reboot.h>
36#include <linux/string.h>
36#include <net/netlink.h> 37#include <net/netlink.h>
37#include <net/genetlink.h> 38#include <net/genetlink.h>
38 39
@@ -713,10 +714,13 @@ policy_store(struct device *dev, struct device_attribute *attr,
713 int ret = -EINVAL; 714 int ret = -EINVAL;
714 struct thermal_zone_device *tz = to_thermal_zone(dev); 715 struct thermal_zone_device *tz = to_thermal_zone(dev);
715 struct thermal_governor *gov; 716 struct thermal_governor *gov;
717 char name[THERMAL_NAME_LENGTH];
718
719 snprintf(name, sizeof(name), "%s", buf);
716 720
717 mutex_lock(&thermal_governor_lock); 721 mutex_lock(&thermal_governor_lock);
718 722
719 gov = __find_governor(buf); 723 gov = __find_governor(strim(name));
720 if (!gov) 724 if (!gov)
721 goto exit; 725 goto exit;
722 726
@@ -1624,7 +1628,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
1624 if (!ops || !ops->get_temp) 1628 if (!ops || !ops->get_temp)
1625 return ERR_PTR(-EINVAL); 1629 return ERR_PTR(-EINVAL);
1626 1630
1627 if (trips > 0 && !ops->get_trip_type) 1631 if (trips > 0 && (!ops->get_trip_type || !ops->get_trip_temp))
1628 return ERR_PTR(-EINVAL); 1632 return ERR_PTR(-EINVAL);
1629 1633
1630 tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL); 1634 tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
diff --git a/drivers/staging/ti-soc-thermal/Kconfig b/drivers/thermal/ti-soc-thermal/Kconfig
index e81375fb2155..e81375fb2155 100644
--- a/drivers/staging/ti-soc-thermal/Kconfig
+++ b/drivers/thermal/ti-soc-thermal/Kconfig
diff --git a/drivers/staging/ti-soc-thermal/Makefile b/drivers/thermal/ti-soc-thermal/Makefile
index 0ca034fb419d..0ca034fb419d 100644
--- a/drivers/staging/ti-soc-thermal/Makefile
+++ b/drivers/thermal/ti-soc-thermal/Makefile
diff --git a/drivers/staging/ti-soc-thermal/TODO b/drivers/thermal/ti-soc-thermal/TODO
index 7da787d19241..7da787d19241 100644
--- a/drivers/staging/ti-soc-thermal/TODO
+++ b/drivers/thermal/ti-soc-thermal/TODO
diff --git a/drivers/staging/ti-soc-thermal/omap4-thermal-data.c b/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c
index d255d33da9eb..d255d33da9eb 100644
--- a/drivers/staging/ti-soc-thermal/omap4-thermal-data.c
+++ b/drivers/thermal/ti-soc-thermal/omap4-thermal-data.c
diff --git a/drivers/staging/ti-soc-thermal/omap4xxx-bandgap.h b/drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h
index 6f2de3a3356d..6f2de3a3356d 100644
--- a/drivers/staging/ti-soc-thermal/omap4xxx-bandgap.h
+++ b/drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h
diff --git a/drivers/staging/ti-soc-thermal/omap5-thermal-data.c b/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
index eff0c80fd4af..eff0c80fd4af 100644
--- a/drivers/staging/ti-soc-thermal/omap5-thermal-data.c
+++ b/drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
diff --git a/drivers/staging/ti-soc-thermal/omap5xxx-bandgap.h b/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
index 400b55dffadd..400b55dffadd 100644
--- a/drivers/staging/ti-soc-thermal/omap5xxx-bandgap.h
+++ b/drivers/thermal/ti-soc-thermal/omap5xxx-bandgap.h
diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index f20c1cfe9800..f20c1cfe9800 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.h b/drivers/thermal/ti-soc-thermal/ti-bandgap.h
index 5f4794abf583..5f4794abf583 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.h
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.h
diff --git a/drivers/staging/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index e3c5e677eaa5..e3c5e677eaa5 100644
--- a/drivers/staging/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
diff --git a/drivers/staging/ti-soc-thermal/ti-thermal.h b/drivers/thermal/ti-soc-thermal/ti-thermal.h
index 5055777727cc..5055777727cc 100644
--- a/drivers/staging/ti-soc-thermal/ti-thermal.h
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal.h