12 Jul, 2013
1 commit
-
Pull thermal management updates from Zhang Rui:
"There are not too many changes this time, except two new platform
thermal drivers, ti-soc-thermal driver and x86_pkg_temp_thermal
driver, and a couple of small fixes.Highlights:
- move the ti-soc-thermal driver out of the staging tree to the
thermal tree.- introduce the x86_pkg_temp_thermal driver. This driver registers
CPU digital temperature package level sensor as a thermal zone.- small fixes/cleanups including removing redundant use of
platform_set_drvdata() and of_match_ptr for all platform thermal
drivers"* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (34 commits)
thermal: cpu_cooling: fix stub function
thermal: ti-soc-thermal: use standard GPIO DT bindings
thermal: MAINTAINERS: Add git tree path for SoC specific updates
thermal: fix x86_pkg_temp_thermal.c build and Kconfig
Thermal: Documentation for x86 package temperature thermal driver
Thermal: CPU Package temperature thermal
thermal: consider emul_temperature while computing trend
thermal: ti-soc-thermal: add DT example for DRA752 chip
thermal: ti-soc-thermal: add dra752 chip to device table
thermal: ti-soc-thermal: add thermal data for DRA752 chips
thermal: ti-soc-thermal: remove usage of IS_ERR_OR_NULL
thermal: ti-soc-thermal: freeze FSM while computing trend
thermal: ti-soc-thermal: remove external heat while extrapolating hotspot
thermal: ti-soc-thermal: update DT reference for OMAP5430
x86, mcheck, therm_throt: Process package thresholds
thermal: cpu_cooling: fix 'descend' check in get_property()
Thermal: spear: Remove redundant use of of_match_ptr
Thermal: kirkwood: Remove redundant use of of_match_ptr
Thermal: dove: Remove redundant use of of_match_ptr
Thermal: armada: Remove redundant use of of_match_ptr
...
08 Jul, 2013
1 commit
-
This change updates the ti-soc-thermal driver to use
standard GPIO DT bindings to read the GPIO number associated
to thermal shutdown IRQ, in case the device features it.Previously, the code was using a specific DT bindings.
As now OMAP supports the standard way to model GPIOs,
there is no point in having a ti specific binding.Cc: Zhang Rui
Cc: Grant Likely
Cc: Rob Herring
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Eduardo Valentin
19 Jun, 2013
1 commit
-
EXYNOS4212 and EXYNOS4412 have the same thermal block, so there is no
reason to include support only for EXYNOS4412 in this driver.Cc: linux-pm@vger.kernel.org
Cc: Zhang Rui
Cc: Eduardo Valentin
Signed-off-by: Tomasz Figa
Signed-off-by: Kyungmin Park
Signed-off-by: Kukjin Kim
18 Jun, 2013
4 commits
-
Fix build error in x86_pkg_temp_thermal.c. It requires that
X86_MCE & X86_THERMAL_VECTOR be enabled, so depend on the latter symbol,
since it depends on X86_MCE (indirectly).Also, X86_PKG_TEMP_THERMAL is already inside an "if THERMAL" block,
so remove that duplicated dependency.ERROR: "platform_thermal_package_rate_control" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
ERROR: "platform_thermal_package_notify" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!Signed-off-by: Randy Dunlap
Acked-by: Borislav Petkov
Signed-off-by: Zhang Rui -
Conflicts:
drivers/thermal/Kconfig
drivers/thermal/Makefile -
This driver register CPU digital temperature sensor as a thermal
zone at package level.
Each package will show up as one zone with at max two trip points.
These trip points can be both read and updated. Once a non zero
value is set in the trip point, if the package package temperature
goes above or below this setting, a thermal notification is
generated.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Zhang Rui
13 Jun, 2013
7 commits
-
In case emulated temperature is in use, using the trend
provided by driver layer can lead to bogus situation.
In this case, debugger user would set a temperature value,
but the trend would be from driver computation.To avoid this situation, this patch changes the get_tz_trend()
to consider the emulated temperature whenever that is in use.Cc: Zhang Rui
Cc: Amit Daniel Kachhap
Cc: Durgadoss R
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Add support to TI dra752 chips by adapting the driver
device table.Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
This patch adds the thermal data for TI DRA752 chips.
In this change it includes (autogen):
. Register offset definitions
. Bitfields and masks for all registers
. Conversion tableAlso, the thermal limits, thresholds and extrapolation
rules are included. The extrapolation rule is simply
add +2C as margin.All 5 sensors, MPU, GPU, CORE, DSPEVE and IVA, are defined
and exposed. Only MPU has cooling device.Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
macro. This macro can lead to dangerous results, like returning
success (0) during a failure scenario (NULL pointer handling).For this reason this patch is changing the driver after
revisiting the code. These are the cases:
i. For cases in which IS_ERR_OR_NULL() is used for checking
return values of functions that returns either PTR_ERR()
or a valid pointer, it has been translated to IS_ERR() check only.
ii. For cases that a NULL check is still needed, it has been
translated to if (!ptr || IS_ERR(ptr)).Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
In order to read the history buffer, it is required to
freeze BG FSM. This patch adds the missing piece of code
to freeze the FSM and also a contention area to avoid
other parts of the code to access the DTEMPs.Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
For boards that provide a PCB sensor close to SoC junction
temperature, it is possible to remove the cumulative heat
reported by the SoC temperature sensor.This patch changes the extrapolation computation to consider
an external sensor in the extrapolation equations.Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui
28 May, 2013
11 commits
-
The variable 'descend' is initialized as -1 in function get_property(),
and will never get any chance to be updated by the following code.if (freq != CPUFREQ_ENTRY_INVALID && descend != -1)
descend = !!(freq > table[i].frequency);This makes function get_property() return the wrong frequency for given
cooling level if the frequency table is sorted in ascending. Fix it
by correcting the 'descend' check in if-condition to 'descend == -1'.Signed-off-by: Shawn Guo
Signed-off-by: Zhang Rui -
'spear_thermal_id_table' is always compiled in and the driver
is dependent on OF. Hence use of of_match_ptr is unnecessary.Signed-off-by: Sachin Kamat
Cc: Vincenzo Frascino
Cc: Viresh Kumar
Acked-by: Viresh Kumar
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
'kirkwood_thermal_id_table' is always compiled in and the driver
is dependent on OF. Hence use of of_match_ptr is unnecessary.Signed-off-by: Sachin Kamat
Cc: Nobuhiro Iwamatsu
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
'dove_thermal_id_table' is always compiled in and the driver
is dependent on OF. Hence use of of_match_ptr is unnecessary.Signed-off-by: Sachin Kamat
Cc: Andrew Lunn
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
'armada_thermal_id_table' is always compiled in and the driver
is dependent on OF. Hence use of of_match_ptr is unnecessary.Signed-off-by: Sachin Kamat
Cc: Ezequiel Garcia
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
This patch moves the ti-soc-thermal driver out of
the staging tree to the thermal tree.Cc: Grant Likely
Cc: Rob Herring
Cc: Rob Landley
Cc: Greg Kroah-Hartman
Cc: Zhang Rui
Cc: Eduardo Valentin
Cc: J Keerthy
Cc: Radhesh Fadnis
Cc: Cyril Roelandt
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: linux-pm@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
devm_ioremap_resource does sanity checks on the given resource.
No need to duplicate this in the driver.CC: Ezequiel Garcia
CC: Vincenzo Frascino
Signed-off-by: Zhang Rui
Acked-by: Ezequiel Garcia -
This patch adds a requirement needing .get_trip_temp() callback
function for registering thermal zone device. This function is
used when thermal zone is updated and essential where thermal core
handles thermal trip based only polling way not hw interrupt.Signed-off-by: Jonghwa Lee
Signed-off-by: MyungJoo Ham
Acked-by: Durgadoss R
Signed-off-by: Zhang Rui -
Setting policy results in invalid value error.
% echo "step_wise" > policy
% echo: write error: Invalid argumentNeed clean up of the buffer which "echo" may add based on the arguments, before
comparing aganist list of governor names.Signed-off-by: Andy Shevchenko
Reported-by: Srinivas Pandruvada
Acked-by: Eduardo Valentin
Tested-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Signed-off-by: Laurent Pinchart
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui
20 May, 2013
2 commits
-
Use the newly introduced devm_ioremap_resource().
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.CC: Vincenzo Frascino
Signed-off-by: Zhang Rui -
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.Signed-off-by: Wolfram Sang
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui
18 May, 2013
1 commit
-
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.Signed-off-by: Wolfram Sang
06 May, 2013
6 commits
-
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Vincenzo Frascino
Acked-by: Eduardo Valentin
Acked-by: Viresh Kumar
Signed-off-by: Zhang Rui -
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Kuninori Morimoto
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Nobuhiro Iwamatsu
Acked-by: Eduardo Valentin
Acked-by: Nobuhiro Iwamatsu
Signed-off-by: Zhang Rui -
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Andrew Lunn
Acked-by: Andrew Lunn
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Ezequiel Garcia
Acked-by: Ezequiel Garcia
Acked-by: Eduardo Valentin
Signed-off-by: Zhang Rui
27 Apr, 2013
6 commits
-
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
macro. This macro can lead to dangerous results, like returning
success (0) during a failure scenario (NULL pointer handling).The case present in this driver can be translated to a simple
check for IS_ERR(), as the cpufreq_cooling_register() returns
either a valid pointer or an ERR_PTR().Cc: Zhang Rui
Cc: Russell King
Cc: Grant Likely
Cc: Rob Herring
Cc: Hongbo Zhang
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Eduardo Valentin
Acked-by: Fabio Baltieri
Signed-off-by: Zhang Rui -
This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
macro. This macro can lead to dangerous results, like returning
success (0) during a failure scenario (NULL pointer handling).The case present in this patch has simply be translated to
normal check for NULL and if the pointer has an error code.
The later case is needed because functions like
thermal_zone_get_zone_by_name() could return an ERR_PTR().Cc: Zhang Rui
Cc: Russell King
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Improve code readiness by changing alignments so that
they match open parenthesis, like checkpatch.pl --strict
suggests.Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Simple code style fix.
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
Remove unnecessary blank line.
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui