summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'next' of ↵Linus Torvalds2014-10-2416-327/+1772
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: "Sorry that I missed the merge window as there is a bug found in the last minute, and I have to fix it and wait for the code to be tested in linux-next tree for a few days. Now the buggy patch has been dropped entirely from my next branch. Thus I hope those changes can still be merged in 3.18-rc2 as most of them are platform thermal driver changes. Specifics: - introduce ACPI INT340X thermal drivers. Newer laptops and tablets may have thermal sensors and other devices with thermal control capabilities that are exposed for the OS to use via the ACPI INT340x device objects. Several drivers are introduced to expose the temperature information and cooling ability from these objects to user-space via the normal thermal framework. From: Lu Aaron, Lan Tianyu, Jacob Pan and Zhang Rui. - introduce a new thermal governor, which just uses a hysteresis to switch abruptly on/off a cooling device. This governor can be used to control certain fan devices that can not be throttled but just switched on or off. From: Peter Feuerer. - introduce support for some new thermal interrupt functions on i.MX6SX, in IMX thermal driver. From: Anson, Huang. - introduce tracing support on thermal framework. From: Punit Agrawal. - small fixes in OF thermal and thermal step_wise governor" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (25 commits) Thermal: int340x thermal: select ACPI fan driver Thermal: int3400_thermal: use acpi_thermal_rel parsing APIs Thermal: int340x_thermal: expose acpi thermal relationship tables Thermal: introduce int3403 thermal driver Thermal: introduce INT3402 thermal driver Thermal: move the KELVIN_TO_MILLICELSIUS macro to thermal.h ACPI / Fan: support INT3404 thermal device ACPI / Fan: add ACPI 4.0 style fan support ACPI / fan: convert to platform driver ACPI / fan: use acpi_device_xxx_power instead of acpi_bus equivelant ACPI / fan: remove no need check for device pointer ACPI / fan: remove unused macro Thermal: int3400 thermal: register to thermal framework Thermal: int3400 thermal: add capability to detect supporting UUIDs Thermal: introduce int3400 thermal driver ACPI: add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package() ACPI: make acpi_create_platform_device() an external API thermal: step_wise: fix: Prevent from binary overflow when trend is dropping ACPI: introduce ACPI int340x thermal scan handler thermal: Added Bang-bang thermal governor ...
| * Merge branch 'int340x-thermal' of .git into nextZhang Rui2014-10-179-312/+1503
| |\
| | * Thermal: int340x thermal: select ACPI fan driverZhang Rui2014-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | we share the same driver for both ACPI predefined Fan device and INT3404 Fan device, thus we should select the ACPI Fan driver when int340x thermal drivers are enabeld. Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: int3400_thermal: use acpi_thermal_rel parsing APIsJacob Pan2014-10-111-159/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI _TRT and _ART parsing code has been moved to acpi_thermal_rel such that it can be used by other devices in the future. Use the parsing APIs in acpi_thermal_rel.c instead. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: int340x_thermal: expose acpi thermal relationship tablesJacob Pan2014-10-114-0/+490
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI 4.0 introduced two thermal relationship tables via _ART (active cooling) and _TRT (passive cooling) objects. These tables contain many to many relationships among thermal sensors and cooling devices. This patch parses _ART and _TRT and makes the result available to the userspace via an misc device interface. At the same time, kernel drivers can also request parsing results from internal kernel APIs. The results include source and target devices, influence, and sampling rate in case of _TRT. For _ART, the result shows source device, target device, and weight percentage. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: introduce int3403 thermal driverLan Tianyu2014-10-115-312/+478
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI INT3403 device object can be used to retrieve temperature date from temperature sensors present in the system, and to expose device' performance control. The previous INT3403 thermal driver supports temperature reporting only, thus remove it and introduce this new & enhanced one. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: introduce INT3402 thermal driverAaron Lu2014-10-102-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI INT3402 device object could report temperature for the memory module. To expose such information to user space, a thermal zone device is registered for it so that the thermal sysfs interface can expose such information for userspace to use. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: int3400 thermal: register to thermal frameworkZhang Rui2014-10-102-0/+104
| | | | | | | | | | | | Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: int3400 thermal: add capability to detect supporting UUIDsZhang Rui2014-10-101-0/+69
| | | | | | | | | | | | Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * Thermal: introduce int3400 thermal driverZhang Rui2014-10-104-1/+248
| | | | | | | | | | | | | | | | | | | | | Introduce int3400 thermal driver. And make INT3400 driver enumerate the other int340x thermal components shown in _ART/_TRT. Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * ACPI: introduce ACPI int340x thermal scan handlerZhang Rui2014-09-111-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer laptops and tablets that use ACPI may have thermal sensors and other devices with thermal control capabilities outside the core CPU/SOC, for thermal safety reasons. They are exposed for the OS to use via 1) INT3400 ACPI device object as the master. 2) INT3401 ~ INT340B ACPI device objects as the slaves. This patch introduces a scan handler to enumerate the INT3400 ACPI device object to platform bus, and prevent its slaves from being enumerated before the controller driver being probed. Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Merge branch 'thermal-core-fix' of .git into nextZhang Rui2014-10-111-1/+1
| |\ \
| | * | thermal: step_wise: fix: Prevent from binary overflow when trend is droppingLukasz Majewski2014-10-091-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that some boards can have instance->lower greater than 0 and when thermal trend is dropping it results with next_target equal to -1. Since the next_target is defined as unsigned long it is interpreted as 0xFFFFFFFF and larger than instance->upper. As a result the next_target is set to instance->upper which ramps up to maximal cooling device target when the temperature is steadily decreasing. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Merge branches 'eduardo-soc' and 'bang-bang-governor' of .git into nextZhang Rui2014-09-185-0/+155
| |\ \
| | * | thermal: Added Bang-bang thermal governorPeter Feuerer2014-08-275-0/+155
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bang-bang thermal governor uses a hysteresis to switch abruptly on or off a cooling device. It is intended to control fans, which can not be throttled but just switched on or off. Bang-bang cannot be set as default governor as it is intended for special devices only. For those special devices the driver needs to explicitely request it. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Andreas Mohr <andi@lisas.de> Cc: Borislav Petkov <bp@suse.de> Cc: Javi Merino <javi.merino@arm.com> Cc: linux-pm@vger.kernel.org Signed-off-by: Peter Feuerer <peter@piie.net> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Thermal: imx: add i.mx6sx thermal supportAnson Huang2014-08-091-13/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i.MX6SX has some new features of thermal interrupt function, there are LOW, HIGH and PANIC irq for thermal sensor, so add platform data to separate different thermal version; The reset value of LOW ALARM is 0 which means the highest temp, so the LOW ALARM will be triggered once irq is enabled, so we need to correct it before enabling thermal irq; Enable PANIC ALARM as critical trip point, it will trigger system reset via SRC module once PANIC IRQ is triggered, it is pure hardware function, so use it instead of software reset by cooling device. Signed-off-by: Anson Huang <b20788@freescale.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| * | thermal: add support to disable thermal zone from DTSLaxman Dewangan2014-07-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to check status of the thermal zone before registering the zone. This will help on disabling some non-existing thermal zone from the top level DTS file out of common dtsi thermalzone file. For example, we have 3 platforms almost same but thermal zones on this platform are little bit different. Platform 1 and 2 have three thermal zones and platform 3 has two thermal zones. To avoid duplication of the thermal zones entries on each DTS file of platforms,we created one common dtsi file for thermal zone and included this dtsi file from these 3 platform's top level dts file. On common thermal zone com dtsi file, all thermal zone are enabled and need to disable one of thermal zone on platform 3 dts file. For this, we just added entry status = "disabled" for that thermal zone on platform 3 dts file and along with this change to make it work. This way, we reuse the common file and control the enable/disable of the thermal zone from top level dts file. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| * | thermal: trace: Trace when temperature is above a trip pointPunit Agrawal2014-07-293-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new event to trace when the temperature is above a trip point. Use the trace-point when handling non-critical and critical trip pionts. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| * | thermal: trace: Trace when a cooling device's state is updatedPunit Agrawal2014-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce and use an event to trace when a cooling device's state is updated. This is useful to follow the effect of governor decisions on cooling devices. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| * | thermal: trace: Trace temperature changesPunit Agrawal2014-07-291-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new event to trace the temperature of a thermal zone. Using this event trace the temperature changes of the thermal zone every-time it is updated. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* | thermal: replace strnicmp with strncasecmpRasmus Villemoes2014-10-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | thermal: Remove ARCH_KIRKWOOD dependencyAndrew Lunn2014-09-091-1/+1
|/ | | | | | | | | | | | | mach-kirkwood has been removed, now that kirkwood lives in mach-mvebu. Depend on MACH_KIRKWOOD, which will be set when kirkwood is built as part of ARCH_MVEBU. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Acked-by: Eduardo Valentin <edubezval@gmail.com> Link: https://lkml.kernel.org/r/1409417172-6846-4-git-send-email-andrew@lunn.ch Signed-off-by: Jason Cooper <jason@lakedaemon.net>
*-------. Merge branches 'exynos-fix', 'for-rc', 'int3403-fix', 'misc', 'rcar-thermal' ↵Zhang Rui2014-07-2210-9/+888
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | and 'sti-thermal' of .git into next
| | | | | * thermal: sti: Add support for ST's Memory Mapped based Thermal controllerLee Jones2014-07-153-0/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the traditional way of obtaining a device driver's register address space. The aim of this driver is to supply controller specific information to the ST Thermal Core. Signed-off-by: Ajit Pal Singh <ajitpal.singh@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | | * thermal: sti: Add support for ST's System Config Register based Thermal ↵Lee Jones2014-07-153-0/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | controller Supply controller specific information to the ST Thermal Core. Signed-off-by: Ajit Pal Singh <ajitpal.singh@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | | * thermal: sti: Introduce ST Thermal core codeLee Jones2014-07-156-0/+428
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This core is shared by both ST's 'memory mapped' and 'system configuration register' based Thermal controllers. Signed-off-by: Ajit Pal Singh <ajitpal.singh@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | thermal: cpu_cooling: fix typo highjack -> hijackJavi Merino2014-07-221-1/+1
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Cc: Eduardo Valentin <eduardo.valentin@ti.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: int3403: Add CRT and PSV tripSrinivas Pandruvada2014-06-301-7/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACPI object definition can contain passive and critical trip temperature. Export them via thermal sysfs. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | | thermal: allow building dove_thermal with mvebuRiku Voipio2014-07-151-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DT-enabled Dove has moved from ARCH_DOVE in mach-dove to MACH_DOVE in mach-mvebu. As non-DT ARCH_DOVE will stay to rot for a while, add a new DT-only MACH_DOVE to thermal Kconfig. This was originally supposed to go in via "ARM: dove: prepare new Dove DT Kconfig" patch from Sebastian Hesselbarth for 3.15, but slipped through the cracks. I've tested on CuBox that without this patch you can't compile dove_thermal into a mach-mvebu based kernel, and with this patch I can build the driver and it works as expected run-time. v2: non-ascii char creeped in somehow Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | | thermal: samsung: Add TMU support for Exynos3250 SoCChanwoo Choi2014-07-154-2/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add registers, bit fields and compatible strings for Exynos3250 TMU (Thermal Management Unit). Exynos3250 uses the Cortex-A7 dual cores and has a target speed of 1.0 GHz. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> [Add MUX address setting bits by Jonghwa Lee] Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Amit Daniel Kachhap<amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | | thermal: exynos: fix ordering in exynos_tmu_remove()Bartlomiej Zolnierkiewicz2014-07-151-2/+2
|/ / | | | | | | | | | | | | | | | | | | It might not be a problem currently but unregister/uninitialize things in the reverse order that they are registered/initialized. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checkedRickard Strandqvist2014-07-011-1/+1
| | | | | | | | | | | | | | Wrong address is checked after memory allocation. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | Thermal: imx: correct critical trip temperature settingAnson Huang2014-07-011-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On latest i.MX6 SOC with thermal calibration data of 0x5A100000, the critical trip temperature will be an invalid value and cause system auto shutdown as below log: thermal thermal_zone0: critical temperature reached(42 C),shutting down So, with universal formula for thermal sensor, only room temperature point is calibrated, which means the calibration data read from fuse only has valid data of bit [31:20], others are all 0, the critical trip point temperature can NOT depend on the hot point calibration data, here we set it to 20 C higher than default passive temperature. Signed-off-by: Anson Huang <b20788@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: Bind cooling devices with the correct argumentsPunit Agrawal2014-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When binding cooling devices to thermal zones created from the device tree the minimum and maximum cooling states are in the wrong order leading to failure to bind. Fix the order of cooling states in the call to thermal_zone_bind_cooling_device to fix this. Cc:Zhang Rui <rui.zhang@intel.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: Add braces around suspect codeStephen Boyd2014-06-301-1/+2
| | | | | | | | | | | | | | | | It looks like this code is missing braces, otherwise the if statement shouldn't have been indented. Fix it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: hwmon: Make the check for critical temp valid consistentAaron Lu2014-06-301-15/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 05/21/2014 04:22 PM, Aaron Lu wrote: > On 05/21/2014 01:57 PM, Kui Zhang wrote: >> Hello, >> >> I get following error when rmmod thermal. >> >> rmmod thermal >> Killed While dealing with this problem, I found another problem that also results in a kernel crash on thermal module removal: From: Aaron Lu <aaron.lu@intel.com> Date: Wed, 21 May 2014 16:05:38 +0800 Subject: [PATCH] thermal: hwmon: Make the check for critical temp valid consistent We used the tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, temp) to decide if we need to create the temp_crit attribute file but we just check if tz->ops->get_crit_temp exists to decide if we need to remove that attribute file. Some ACPI thermal zone doesn't have a valid critical trip point and that would result in removing a non-existent device file on thermal module unload. Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Merge branch 'next' of ↵Linus Torvalds2014-06-1113-71/+957
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management update from Zhang Rui: "Specifics: - fix a bug in Exynos thermal driver, which overwrites the hardware trip point threshold when updating software trigger levels and results in emergency shutdown. From: Tushar Behera. - add thermal sensor support for Armada 375 and 38x SoCs. From Ezequiel Garcia. - add TMU (Thermal Management Unit) support for Exynos5260 and Exynos5420 SoCs. From Naveen Krishna Chatradhi. - add support for the additional digital temperature sensors in the Intel SoCs like Bay Trail. From: Srinivas Pandruvada. - a couple of cleanups and small fixes from Jingoo Han, Bartlomiej Zolnierkiewicz, Geert Uytterhoeven, Jacob Pan, Paul Walmsley and Lan,Tianyu" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (21 commits) thermal: spear: remove unnecessary OOM messages thermal: exynos: remove unnecessary OOM messages thermal: rcar: remove unnecessary OOM messages thermal: armada: Support Armada 380 SoC thermal: armada: Support Armada 375 SoC thermal: armada: Allow to specify an 'inverted readout' sensor thermal: armada: Pass the platform_device to init_sensor() thermal: armada: Add generic infrastructure to handle the sensor thermal: armada: Add infrastructure to support generic formulas thermal: armada: Rename armada_thermal_ops struct thermal/intel_powerclamp: add newer cpu ids thermal: rcar: Use pm_runtime_put() i.s.o. pm_runtime_put_sync() thermal: samsung: Only update available threshold limits Thermal/int3403: Fix thermal hysteresis unit conversion thermal: Intel SoC DTS thermal thermal: samsung: Add TMU support for Exynos5260 SoCs thermal: samsung: Add TMU support for Exynos5420 SoCs thermal: samsung: change base_common to more meaningful base_second thermal: samsung: replace inten_ bit fields with intclr_ thermal: offer Samsung thermal support only when ARCH_EXYNOS is defined ...
| *---. Merge branches 'armada-375-380-soc-support', 'eduardo-thermal-soc-fixes', ↵Zhang Rui2014-05-1512-52/+818
| |\ \ \ | | | | | | | | | | | | | | | 'intel-soc-dts-thermal' and 'thermal-soc-fixes' of .git into next
| | | | * thermal: spear: remove unnecessary OOM messagesJingoo Han2014-05-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * thermal: exynos: remove unnecessary OOM messagesJingoo Han2014-05-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * thermal: rcar: remove unnecessary OOM messagesJingoo Han2014-05-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * thermal/intel_powerclamp: add newer cpu idsJacob Pan2014-05-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Broadwell and Valleyview CPUs Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
| | | | * thermal: rcar: Use pm_runtime_put() i.s.o. pm_runtime_put_sync()Geert Uytterhoeven2014-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need for this to be synchronous Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * thermal: samsung: Only update available threshold limitsTushar Behera2014-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the threshold limits are updated in 2 stages, once for all software trigger levels and again for hardware trip point. While updating the software trigger levels, it overwrites the threshold limit for hardware trip point thereby forcing the Exynos core to issue an emergency shutdown. Updating only the required fields in threshold register fixes this issue. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | | * Thermal/int3403: Fix thermal hysteresis unit conversionlan,Tianyu2014-05-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thermal hysteresis represents a temperature difference. But the original code treats it as a temperature value, Convert it from tenths of degree Kelvin to Milli-Celsius by deducing 273200. This is not right. Kelvin and Celsius have same degree size. From temperature difference view, the conversion between tenths of degree Kelvin unit and Milli-Celsius unit is just to multiply 100. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | thermal: Intel SoC DTS thermalSrinivas Pandruvada2014-05-153-0/+492
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Intel SoCs like Bay Trail, there are 2 additional digital temperature sensors(DTS), in addition to the standard DTSs in the core. Also they support 4 programmable thresholds, out of which two can be used by OSPM. These thresholds can be used by OSPM thermal control. Out of these two thresholds, one is used by driver and one user mode can change via thermal sysfs to get notifications on threshold violations. The driver defines one critical trip points, which is set to TJ MAX - offset. The offset can be changed via module parameter (default 5C). Also it uses one of the thresholds to get notification for this temperature violation. This is very important for orderly shutdown as the many of these devices don't have ACPI thermal zone, and expects that there is some other thermal control mechanism present in OSPM. When a Linux distro is used without additional specialized thermal control program, BIOS can do force shutdown when thermals are not under control. When temperature reaches critical, the Linux thermal core will initiate an orderly shutdown. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Merge branch 'next' of ↵Zhang Rui2014-05-156-38/+308
| | |\ \ | | | |/ | | |/| | | | | git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into thermal-soc-fixes
| | | * thermal: samsung: Add TMU support for Exynos5260 SoCsNaveen Krishna Chatradhi2014-05-064-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the registers, bit fields and compatible strings required to support for the 5 TMU channels on Exynos5260. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| | | * thermal: samsung: Add TMU support for Exynos5420 SoCsNaveen Krishna Chatradhi2014-05-064-4/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exynos5420 has 5 TMU channels, the TRIMINFO register is misplaced for TMU channels 2, 3 and 4 TRIMINFO at 0x1006c000 contains data for TMU channel 3 TRIMINFO at 0x100a0000 contains data for TMU channel 4 TRIMINFO at 0x10068000 contains data for TMU channel 2 This patch 1 Adds the neccessary register changes and arch information to support Exynos5420 SoCs. 2. Handles the gate clock for misplaced TRIMINFO register 3. Updates the Documentation at Documentation/devicetree/bindings/thermal/exynos-thermal.txt Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
| | | * thermal: samsung: change base_common to more meaningful base_secondNaveen Krishna Chatradhi2014-05-063-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Exynos5440 and Exynos5420 there are registers common across the TMU channels. To support that, we introduced a ADDRESS_MULTIPLE flag in the driver and the 2nd set of register base and size are provided in the "reg" property of the node. As per Amit's suggestion, this patch changes the base_common to base_second and SHARED_MEMORY to ADDRESS_MULTIPLE. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
OpenPOWER on IntegriCloud