Jon Hunter | 30 Nov 17:42 2015


Currently, if PM is disabled in the kernel then so is
PM_GENERIC_DOMAINS. Although this makes sense, I can see a scenario
where having minimal genpd support could be advantageous.

I am looking at enabling genpd for Tegra and ideally we would populate
the power domains when the platform device is probed for the power
management controller (PMC) as this device contains the registers for
enabling the power domains.

This works fine for the case where PM is enabled, but I am concerned
about the case where we don't have PM enabled in the kernel. In this
case, because domains are not populated early during the boot process, I
am concerned that there is a chance for a device dependent on a power
domain to be probed before the PMC device has been probed and had chance
to turn on any power domains.

Obviously, we could try and play with the ordering of devices, but it
seems to me that even if PM is not enabled, it would still be nice to
register power domains with the kernel and allow devices to attach to
them and only probe the device if they are powered.

Does this sound reasonable or is there a better approach?

To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo <at>
More majordomo info at

(Continue reading)

Ulf Hansson | 30 Nov 16:21 2015

[PATCH v2] PM / Domains: Allow runtime PM callbacks to be re-used during system PM

A runtime PM centric subsystem/driver may typically use the runtime PM
helpers, pm_runtime_force_suspend|resume() in the system PM path. This
means the genpd's runtime PM callbacks might be invoked even when runtime
PM has been disabled for the device.

To properly cope with these and similar scenarios when these helper
functions are used, change genpd to skip validating and measuring the
device PM QOS latency.

This is needed because otherwise genpd may prevent the device to be put
into low power state. If this occurs during system PM, it causes the
sequence to be aborted as a device's system PM callback returns -EBUSY.

Fixes: ba2bbfbf6307 ("PM / Domains: Remove intermediate states from the
power off sequence")
Reported-by: Cao Minh Hiep <cm-hiep <at>>
Reported-by: Harunaga <nx-truong <at>>
Signed-off-by: Ulf Hansson <ulf.hansson <at>>

Changes in v2:
	- Change variable name and update code to not be limited to only
	system PM, according to suggestion by Kevin.
	- Updated comments in code.
	- Updated change-log.

Notes in v2:
	- Version 1, got tested successfully by Cao Minh Hiep and Harunaga,
	although because of the changes in V2, another round of tests are
	needed to add their tested by tags.
(Continue reading)

Sascha Hauer | 30 Nov 12:42 2015

[PATCH v12] Add Mediatek thermal support

This series adds support for the thermal sensors included in the
MT8173 SoC. Currently only basic temperature reading is supported
without any interrupt support.

The cpufreq driver for MT8173 is currently under review, so there's no
real cooling device available in mainline. Until this is available the
thermal driver can be tested with the following dts snippet. It creates
a fake gpio fan and a fake trip point which is so low that it can easily
be reached with a "cat /dev/zero > /dev/null" on the command line.


Changes since v11:
- Fix usage of uninitialized variable gcc didn't warn about

changes since v10:
- Some style cleanup
- Add comment to make clear why we use the sensors in banks even if we
  currently only use the maximum of all banks

changes since v9:
- rebase on v4.3
- Add support for reading the calibration values from nvmem fuses
- Only register a single thermal zone instead of four as it seems
  that's everything needed

changes since v8:
- Add commit description to binding patch
- rebase on v4.3-rc2

(Continue reading)

Anup Limbu | 30 Nov 11:57 2015

Re: [PATCH] tools/thermal: tmon: cleanup function init_thermal_controller

 +Linux-kernel <at> +linux-pm <at>

On Sun, Nov 29, 2015 at 9:08 PM, Anand Moon <linux.amoon <at>> wrote:
> Hi Anup,
> On 27 November 2015 at 17:26, Anup Limbu <anuplimbu14 <at>> wrote:
>> Replacing return type of function as void from int and removing
>> unused variable ret.
>> Signed-off-by: Anup Limbu <anuplimbu14 <at>>
>> ---
>>  tools/thermal/tmon/pid.c  | 5 +----
>>  tools/thermal/tmon/tmon.h | 2 +-
>>  2 files changed, 2 insertions(+), 5 deletions(-)
>> diff --git a/tools/thermal/tmon/pid.c b/tools/thermal/tmon/pid.c
>> index fd7e9e9..c034bf3 100644
>> --- a/tools/thermal/tmon/pid.c
>> +++ b/tools/thermal/tmon/pid.c
>>  <at>  <at>  -63,10 +63,8  <at>  <at>  static double xk_1, xk_2; /* input temperature x[k-#] */
>>   *
>>   * add a flag for tuning PID
>>   */
>> -int init_thermal_controller(void)
>> +void init_thermal_controller(void)
>>  {
>> -       int ret = 0;
>> -
>>         /* init pid params */
>>         p_param.ts = ticktime;
(Continue reading)

Caesar Wang | 30 Nov 03:28 2015

[PATCH v2 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver.

This series pacthes to support the next soc for this thermal driver.
I don't add the dts thermal data since these SoCs have *_not_* land
in this mainline. I believe these SoCs dts will land in this mainline
then I will add the thermal data for Heiko.

This series patches can apply into Eduardo branch.

Also, this series pacthes have built on github branch.

That's bit ugly typo, sorry for sending again :(.

To fix a build warning came from Dan Carpenter report smatch check,
Thanks. :)

Add the rk3228/rk3399 SoCs compatible for dt-bindings.

Add the rk3228 SoCs for thermal driver.

Add the rk3399 SoCs for thermal driver based on PATCH[4/5].

Changes in v2:
- As Heiko comments, move to documenting the fields in the header
(Continue reading)

Alexander Aring | 29 Nov 17:59 2015

[PATCHv2 0/4] ARM: bcm2835: add support for rpi power domain driver


this patch series contains at first a patch for the power domain subsystem
which offers to exit generic power domains when init was called before.

The RPi Power-Domains need to be enabled/disabled by interacting with the
RPi firmware which can fail. To cleanup the probing we need to undo the
power domains again which was registered before.

- Alex

changes since PATCHv2:
 - rename pm_genpd_uninit to pm_genpd_exit. I adapted here a review note
   from another patch. Usually kernel naming style is like "foobar_init"
   and "foobar_exit" but rarely "uninit". That's why I don't add the ack
   from Ulf Hansson here.
 - split dtsi updates into a separate patch.
 - remove testing steps from commit message.
 - change to "depends on ARCH_BCM2835 || COMPILE_TEST".
 - Add Rob Herring ack.
 - Add Eric Anholt sob.

changes since PATCH (was RFCv2 before):
 - add WARN_ON_ONCE if there are still references from generic power domain
   inside the power domain subsystem when running pm_genpd_uninit.
 - add mutex_destroy when running pm_genpd_uninit.
 - split devicetree binding for rpi power domain driver into a separate patch.
 - order list of <linux/...> includes alphabetical.
 - use rpi_ prefix than raspberrypi_ prefix.
(Continue reading)

Pi-Cheng Chen | 29 Nov 09:31 2015

[PATCH 1/4] cpufreq: mt8173: add CPUFREQ_HAVE_GOVERNOR_PER_POLICY flag

Add CPUFREQ_HAVE_GOVERNOR_PER_POLICY to have individual set of tunables
for each cluster of MT8173.

Signed-off-by: Pi-Cheng Chen <pi-cheng.chen <at>>
 drivers/cpufreq/mt8173-cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
index 83001dc..c438109 100644
--- a/drivers/cpufreq/mt8173-cpufreq.c
+++ b/drivers/cpufreq/mt8173-cpufreq.c
 <at>  <at>  -469,7 +469,8  <at>  <at>  static int mtk_cpufreq_exit(struct cpufreq_policy *policy)

 static struct cpufreq_driver mt8173_cpufreq_driver = {
 	.verify = cpufreq_generic_frequency_table_verify,
 	.target_index = mtk_cpufreq_set_target,
 	.get = cpufreq_generic_get,


To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo <at>
More majordomo info at

(Continue reading)

Zhang Rui | 29 Nov 02:37 2015

[GIT PULL] Thermal Management fixes for v4.4-rc3

Hi, Linus,

Please pull from
  git:// next

to receive the latest Thermal Management updates for 4.4-rc3 with
top-most commit a2291badc355d58ead5c19ae0609468947416040:

  imx: thermal: use CPU temperature grade info for thresholds
(2015-11-23 16:38:40 -0800)

on top of commit 5d50ac70fe98518dbf620bfba8184254663125eb:

  Merge tag 'xfs-for-linus-4.4' of
git:// (2015-11-11
20:18:48 -0800)


- Several fixes and cleanups on Rockchip thermal drivers.
- Add the missing support of RK3368 SoCs in Rockchip driver.
- Small fixes on of-thermal, power_allocator, rcar driver, IMX, and QCOM
drivers, and also compilation fixes, on thermal.h, when thermal is not


Arnd Bergmann (2):
(Continue reading)

James Morse | 26 Nov 18:32 2015

[PATCH v3 00/10] arm64: kernel: Add support for hibernate/suspend-to-disk

Hi all,

v2's "clean cached pages on architectures that require it" is wrong.
do_copy_page() isn't used on the resume path for pages restored 'in place'.
There is nowhere we can add the call to flush_icache_range(), instead
patch 9 of this series adds a new 'pbe' list of pages restored in place.
Architectures that need to clean these before they can be executed can walk
this list. This preserves the status-quo a little better, as existing
architectures won't get flush_icache_range() called on these pages.

The first four patches are borrowed from kexec v12, and are used to return
el2 to the hyp stub, as its stack/vectors may be overwritten.

Patches 5 and 6 provide some cleanup to the cpu_suspend() API:
* allowing it to be used with a 'finisher' that needs to return success,
* and turn the MMU on early to allow sleep_save_sp to be accessed by VA.

The last patch adds hibernate support, following the x86 approach, it creates
a temporary set of page tables and copies the hibernate_exit code. The
implementation requires that exactly the same kernel is booted on the
same hardware, and that the kernel is loaded at the same physical address.

This series is based on v4.4-rc2, and can be pulled from:
git:// -b hibernate/v3

Changes from v2:
 * Rewrote patch 9 - we can't clean pages in copy_page(), we need to publish
   a list for the architecture to clean
 * Updated patch 10 following rewritten patch 9
 * Added missing pgprot_val() in hibernate.c, spotted by STRICT_MM_TYPECHECKS
(Continue reading)

Jia Hongtao | 26 Nov 10:21 2015

[PATCH V3] cpufreq: qoriq: Register cooling device based on device tree

Register the qoriq cpufreq driver as a cooling device, based on the
thermal device tree framework. When temperature crosses the passive trip
point cpufreq is used to throttle CPUs.

Signed-off-by: Jia Hongtao <hongtao.jia <at>>
Reviewed-by: Viresh Kumar <viresh.kumar <at>>
Changes for V3:
* Removed unnecessary cpu node NULL check.

Changes for V2:
* Using ->ready callback for cpu cooling device registering.

 drivers/cpufreq/qoriq-cpufreq.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 4f53fa2..cb6a62c 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
 <at>  <at>  -12,6 +12,7  <at>  <at> 

 #include <linux/clk.h>
 #include <linux/cpufreq.h>
+#include <linux/cpu_cooling.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 <at>  <at>  -33,6 +34,7  <at>  <at> 
 struct cpu_data {
(Continue reading)

Jia Hongtao | 26 Nov 07:27 2015

[PATCH V2] cpufreq: qoriq: Register cooling device based on device tree

Register the qoriq cpufreq driver as a cooling device, based on the
thermal device tree framework. When temperature crosses the passive trip
point cpufreq is used to throttle CPUs.

Signed-off-by: Jia Hongtao <hongtao.jia <at>>
Changes for V2:
* Using ->ready callback for cpu cooling device registering.

 drivers/cpufreq/qoriq-cpufreq.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index 4f53fa2..a39f868 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
 <at>  <at>  -12,6 +12,7  <at>  <at> 

 #include <linux/clk.h>
 #include <linux/cpufreq.h>
+#include <linux/cpu_cooling.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 <at>  <at>  -33,6 +34,7  <at>  <at> 
 struct cpu_data {
 	struct clk **pclk;
 	struct cpufreq_frequency_table *table;
+	struct thermal_cooling_device *cdev;
(Continue reading)