Loading Documentation/thermal/cpu-cooling-api.txt +13 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ CPU cooling APIs How To Written by Amit Daniel Kachhap <amit.kachhap@linaro.org> Updated: 12 May 2012 Updated: 6 Jan 2015 Copyright (c) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com) Loading @@ -25,7 +25,18 @@ the user. The registration APIs returns the cooling device pointer. clip_cpus: cpumask of cpus where the frequency constraints will happen. 1.1.2 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) 1.1.2 struct thermal_cooling_device *of_cpufreq_cooling_register( struct device_node *np, const struct cpumask *clip_cpus) This interface function registers the cpufreq cooling device with the name "thermal-cpufreq-%x" linking it with a device tree node, in order to bind it via the thermal DT code. This api can support multiple instances of cpufreq cooling devices. np: pointer to the cooling device device tree node clip_cpus: cpumask of cpus where the frequency constraints will happen. 1.1.3 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) This interface function unregisters the "thermal-cpufreq-%x" cooling device. Loading MAINTAINERS +2 −1 Original line number Diff line number Diff line Loading @@ -9533,7 +9533,8 @@ F: drivers/platform/x86/thinkpad_acpi.c TI BANDGAP AND THERMAL DRIVER M: Eduardo Valentin <edubezval@gmail.com> L: linux-pm@vger.kernel.org S: Supported L: linux-omap@vger.kernel.org S: Maintained F: drivers/thermal/ti-soc-thermal/ TI CLOCK DRIVER Loading drivers/thermal/imx_thermal.c +2 −0 Original line number Diff line number Diff line Loading @@ -608,6 +608,7 @@ static int imx_thermal_suspend(struct device *dev) regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_MEASURE_TEMP); regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_POWER_DOWN); data->mode = THERMAL_DEVICE_DISABLED; clk_disable_unprepare(data->thermal_clk); return 0; } Loading @@ -617,6 +618,7 @@ static int imx_thermal_resume(struct device *dev) struct imx_thermal_data *data = dev_get_drvdata(dev); struct regmap *map = data->tempmon; clk_prepare_enable(data->thermal_clk); /* Enabled thermal sensor after resume */ regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_POWER_DOWN); regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_MEASURE_TEMP); Loading drivers/thermal/of-thermal.c +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(of_thermal_is_trip_valid); * * Return: pointer to trip points table, NULL otherwise */ const struct thermal_trip * const const struct thermal_trip * of_thermal_get_trip_points(struct thermal_zone_device *tz) { struct __thermal_zone *data = tz->devdata; Loading drivers/thermal/rcar_thermal.c +11 −6 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ struct rcar_thermal_priv { struct mutex lock; struct list_head list; int id; int ctemp; u32 ctemp; }; #define rcar_thermal_for_each_priv(pos, common) \ Loading Loading @@ -145,7 +145,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) { struct device *dev = rcar_priv_to_dev(priv); int i; int ctemp, old, new; u32 ctemp, old, new; int ret = -EINVAL; mutex_lock(&priv->lock); Loading Loading @@ -372,6 +372,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) int i; int ret = -ENODEV; int idle = IDLE_INTERVAL; u32 enr_bits = 0; common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); if (!common) Loading @@ -390,7 +391,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) /* * platform has IRQ support. * Then, drier use common register * Then, driver uses common registers */ ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0, Loading @@ -408,9 +409,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) if (IS_ERR(common->base)) return PTR_ERR(common->base); /* enable temperature comparation */ rcar_thermal_common_write(common, ENR, 0x00030303); idle = 0; /* polling delay is not needed */ } Loading Loading @@ -452,8 +450,15 @@ static int rcar_thermal_probe(struct platform_device *pdev) rcar_thermal_irq_enable(priv); list_move_tail(&priv->list, &common->head); /* update ENR bits */ enr_bits |= 3 << (i * 8); } /* enable temperature comparation */ if (irq) rcar_thermal_common_write(common, ENR, enr_bits); platform_set_drvdata(pdev, common); dev_info(dev, "%d sensor probed\n", i); Loading Loading
Documentation/thermal/cpu-cooling-api.txt +13 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ CPU cooling APIs How To Written by Amit Daniel Kachhap <amit.kachhap@linaro.org> Updated: 12 May 2012 Updated: 6 Jan 2015 Copyright (c) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com) Loading @@ -25,7 +25,18 @@ the user. The registration APIs returns the cooling device pointer. clip_cpus: cpumask of cpus where the frequency constraints will happen. 1.1.2 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) 1.1.2 struct thermal_cooling_device *of_cpufreq_cooling_register( struct device_node *np, const struct cpumask *clip_cpus) This interface function registers the cpufreq cooling device with the name "thermal-cpufreq-%x" linking it with a device tree node, in order to bind it via the thermal DT code. This api can support multiple instances of cpufreq cooling devices. np: pointer to the cooling device device tree node clip_cpus: cpumask of cpus where the frequency constraints will happen. 1.1.3 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) This interface function unregisters the "thermal-cpufreq-%x" cooling device. Loading
MAINTAINERS +2 −1 Original line number Diff line number Diff line Loading @@ -9533,7 +9533,8 @@ F: drivers/platform/x86/thinkpad_acpi.c TI BANDGAP AND THERMAL DRIVER M: Eduardo Valentin <edubezval@gmail.com> L: linux-pm@vger.kernel.org S: Supported L: linux-omap@vger.kernel.org S: Maintained F: drivers/thermal/ti-soc-thermal/ TI CLOCK DRIVER Loading
drivers/thermal/imx_thermal.c +2 −0 Original line number Diff line number Diff line Loading @@ -608,6 +608,7 @@ static int imx_thermal_suspend(struct device *dev) regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_MEASURE_TEMP); regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_POWER_DOWN); data->mode = THERMAL_DEVICE_DISABLED; clk_disable_unprepare(data->thermal_clk); return 0; } Loading @@ -617,6 +618,7 @@ static int imx_thermal_resume(struct device *dev) struct imx_thermal_data *data = dev_get_drvdata(dev); struct regmap *map = data->tempmon; clk_prepare_enable(data->thermal_clk); /* Enabled thermal sensor after resume */ regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_POWER_DOWN); regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_MEASURE_TEMP); Loading
drivers/thermal/of-thermal.c +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(of_thermal_is_trip_valid); * * Return: pointer to trip points table, NULL otherwise */ const struct thermal_trip * const const struct thermal_trip * of_thermal_get_trip_points(struct thermal_zone_device *tz) { struct __thermal_zone *data = tz->devdata; Loading
drivers/thermal/rcar_thermal.c +11 −6 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ struct rcar_thermal_priv { struct mutex lock; struct list_head list; int id; int ctemp; u32 ctemp; }; #define rcar_thermal_for_each_priv(pos, common) \ Loading Loading @@ -145,7 +145,7 @@ static int rcar_thermal_update_temp(struct rcar_thermal_priv *priv) { struct device *dev = rcar_priv_to_dev(priv); int i; int ctemp, old, new; u32 ctemp, old, new; int ret = -EINVAL; mutex_lock(&priv->lock); Loading Loading @@ -372,6 +372,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) int i; int ret = -ENODEV; int idle = IDLE_INTERVAL; u32 enr_bits = 0; common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); if (!common) Loading @@ -390,7 +391,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) /* * platform has IRQ support. * Then, drier use common register * Then, driver uses common registers */ ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0, Loading @@ -408,9 +409,6 @@ static int rcar_thermal_probe(struct platform_device *pdev) if (IS_ERR(common->base)) return PTR_ERR(common->base); /* enable temperature comparation */ rcar_thermal_common_write(common, ENR, 0x00030303); idle = 0; /* polling delay is not needed */ } Loading Loading @@ -452,8 +450,15 @@ static int rcar_thermal_probe(struct platform_device *pdev) rcar_thermal_irq_enable(priv); list_move_tail(&priv->list, &common->head); /* update ENR bits */ enr_bits |= 3 << (i * 8); } /* enable temperature comparation */ if (irq) rcar_thermal_common_write(common, ENR, enr_bits); platform_set_drvdata(pdev, common); dev_info(dev, "%d sensor probed\n", i); Loading