[PATCH v3 0/3] thermal: add thermal sensor driver for Hi3660

2017-08-10 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> This series adds thermal support for Hi3660 Soc, which support all the hardware temperture sensors and two virtual sensors(one for maximum value of all and one for average value of all). Patch 1 add dt-binding document to describe how to con

[PATCH v3 3/3] arm64: dts: register Hi3660's thermal sensor

2017-08-10 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang <kevin.wang...@linaro.org> Signed-off-by: Leo Yan <leo@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi| 10 ++ include/dt-bindings/thermal/hi3

[PATCH v3 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-08-10 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang <kevin.wang...@linaro.org> Signed-off-by: Leo Yan <leo

[PATCH v3 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-08-10 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang <kevin.wang...@linaro.org> --- .../devicetree/bindings/thermal/hisi-tsensor.txt | 23 ++ 1 file

[PATCH 3/3] arm64: dts: register Hi3660's thermal sensor

2017-06-19 Thread Tao Wang
Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> Signed-off-by: Leo Yan <leo@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.

[PATCH 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-06-19 Thread Tao Wang
This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> Signed-off-by: Leo Yan <leo@linaro.org> --- drivers/thermal/Kconfig

[PATCH 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-06-19 Thread Tao Wang
This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> --- .../devicetree/bindings/thermal/hi3660-thermal.txt | 17 + 1 file changed, 17 insertions(+) create mode

[Patch v2 3/3] arm64: dts: register Hi3660's thermal sensor

2017-06-21 Thread Tao Wang
Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> Signed-off-by: Leo Yan <leo@linaro.org> --- Changes in v2: - rebase changes on linux next arch/arm64/boot/dts/hisilicon/hi3660.dtsi |6 ++ 1 file changed, 6 insertions(+) diff

[Patch v2 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-06-21 Thread Tao Wang
This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> --- Changes in v2: - remove redundant property .../devicetree/bindings/thermal/hi3660-thermal.txt | 16 1 file chang

[Patch v2 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-06-21 Thread Tao Wang
This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> Signed-off-by: Leo Yan <leo@linaro.org> --- Changes in v2: - correct al

[PATCH] cpufreq: dt: Add support for hi3660

2017-05-23 Thread Tao Wang
Add the compatible string for supporting the generic device tree cpufreq-dt driver on Hisilicon's 3660 SoC. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> --- drivers/cpufreq/cpufreq-dt-platdev.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt-pla

[Patch v2] cpufreq: dt: Add support for hi3660

2017-05-23 Thread Tao Wang
Add the compatible string for supporting the generic device tree cpufreq-dt driver on Hisilicon's 3660 SoC. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> --- Changes in v2: - changed order according to Viresh's suggestion drivers/cpufreq/cpufreq-dt-platdev.c |1 + 1 file chan

[PATCH RFC 2/2] thermal/cpu idle cooling: cpu idle cooling cooperate with cpu cooling

2017-06-05 Thread Tao Wang
gaps between cpu OPPs. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> --- drivers/thermal/Kconfig| 17 drivers/thermal/cpu_cooling.c | 31 + drivers/thermal/cpu_idle_cooling.c |5 + include/linux/cpu_idle_coo

[PATCH RFC 1/2] thermal/cpu idle cooling: Introduce cpu idle cooling driver

2017-06-05 Thread Tao Wang
injection thread, idle injection thread use play_idle to enter idle. In order to reach deepest idle state, all cores are aligned by jiffies. the injected idle ratio can be controlled through cooling device interface. Signed-off-by: Tao Wang <kevin.wang...@hisilicon.com> --- drivers/thermal/K

[PATCH 6/9] thermal/drivers/hisi: add support for multi temp threshold

2017-09-22 Thread Tao Wang
From: Kevin Wangtao tsensor may have multi alarm levels, so we can support more trip point interrupt. Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 21 - 1 file changed, 12 insertions(+), 9

[PATCH 2/9] thermal/drivers/hisi: use round up step value

2017-09-22 Thread Tao Wang
From: Kevin Wangtao Use round up divide to ensure the programmed value of threshold and lag not less than we set, and in order to keep the accuracy while using round up divide, the step value should also be a round up value. Then there is no need to use

[PATCH 8/9] thermal/drivers/hisi: add support for hi3660 SoC

2017-09-22 Thread Tao Wang
From: Kevin Wangtao This patch adds the support for thermal sensor of Hi3660 SoC. Hi3660 tsensor support alarm interrupt and have three configurable alarm thresholds, it also has a configurable hysteresis interval, interrupt will be triggered when temperature rise above

[PATCH 5/9] thermal/drivers/hisi: perpare to add support for other hisi platform

2017-09-22 Thread Tao Wang
From: Kevin Wangtao For platform compatibility, add tsensor operation function pointer to thermal data, and each platform has its own probe function to register proper tsensor operation function to the pointer, platform related resource request are also implemented in

[PATCH 1/9] thermal/drivers/hisi: move clk operation to related function

2017-09-22 Thread Tao Wang
From: Kevin Wangtao The sensor's clock is enabled and disabled outside of the probe and disable function. Moving the corresponding action in the hisi_thermal_setup() and hisi_thermal_disable_sensor(), factors out some lines of code and makes the code more symmetric.

[PATCH 7/9] dt-bindings: Document the hi3660 thermal sensor binding

2017-09-22 Thread Tao Wang
From: Kevin Wangtao This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Kevin Wangtao --- Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt | 9 + 1 file

[PATCH 3/9] thermal/drivers/hisi: put platform code together

2017-09-22 Thread Tao Wang
From: Kevin Wangtao reorganize code for follow-up patch, there is no functional change here. Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 76 +- 1 file changed, 38 insertions(+),

[PATCH 9/9] arm64: dts: register Hi3660's thermal sensor

2017-09-22 Thread Tao Wang
From: Kevin Wangtao add binding for tsensor on H3660, this tsensor is used for SoC thermal control, it supports alarm interrupt. Signed-off-by: Kevin Wangtao --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 1 file changed, 8

[PATCH 4/9] thermal/drivers/hisi: add platform prefix to function name

2017-09-22 Thread Tao Wang
From: Kevin Wangtao reorganize code for follow-up patch, there is no functional change here. Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 145 + 1 file changed, 73 insertions(+),

[PATCH 0/9] add support for Hi3660 tsensor

2017-09-22 Thread Tao Wang
From: Kevin Wangtao This patchset reorganize hisi thermal driver and make it both support Hi6220 and Hi3660. This patchset is based on Daniel thermal patch V2. https://lkml.org/lkml/2017/9/4/432 Kevin Wangtao (9): thermal/drivers/hisi: move clk operation to related

[PATCH v4 0/3] thermal: add thermal sensor driver for Hi3660

2017-08-29 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> This series adds thermal support for Hi3660 Soc, which support all the hardware temperture sensors and two virtual sensors(one for maximum value of all and one for average value of all). Patch 1 add dt-binding document to describe how to con

[PATCH v4 3/3] arm64: dts: register Hi3660's thermal sensor

2017-08-29 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang <kevin.wang...@linaro.org> Signed-off-by: Leo Yan <leo@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi| 14 + include/dt-bindings/thermal/hi3

[PATCH v4 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-08-29 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang <kevin.wang...@linaro.org> Signed-off-by: Leo Yan <leo

[PATCH v4 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-08-29 Thread Tao Wang
From: Tao Wang <kevin.wang...@linaro.org> This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang <kevin.wang...@linaro.org> --- .../devicetree/bindings/thermal/hisi-tsensor.txt | 37 ++ 1 file

[PATCH] thermal/drivers/hisi: disable multi alarm support for hi3660 SoC

2017-10-18 Thread Tao Wang
From: Kevin Wangtao multi alarm interrupt forced a re-trigger of power_allocator_throttle which changes the PID's actual sampling rate, this isn't optimal for IPA, it is best to disable multi alarm support now and sort out this issue later. Signed-off-by: Kevin Wangtao

[PATCH] thermal/drivers/hisi: disable multi alarm support for hi3660 SoC

2017-10-18 Thread Tao Wang
From: Kevin Wangtao multi alarm interrupt forced a re-trigger of power_allocator_throttle which changes the PID's actual sampling rate, this isn't optimal for IPA, it is best to disable multi alarm support now and sort out this issue later. Signed-off-by: Kevin Wangtao ---

[PATCH 0/9] add support for Hi3660 tsensor

2017-09-22 Thread Tao Wang
From: Kevin Wangtao This patchset reorganize hisi thermal driver and make it both support Hi6220 and Hi3660. This patchset is based on Daniel thermal patch V2. https://lkml.org/lkml/2017/9/4/432 Kevin Wangtao (9): thermal/drivers/hisi: move clk operation to related function

[PATCH 4/9] thermal/drivers/hisi: add platform prefix to function name

2017-09-22 Thread Tao Wang
From: Kevin Wangtao reorganize code for follow-up patch, there is no functional change here. Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 145 + 1 file changed, 73 insertions(+), 72 deletions(-) diff --git

[PATCH 9/9] arm64: dts: register Hi3660's thermal sensor

2017-09-22 Thread Tao Wang
From: Kevin Wangtao add binding for tsensor on H3660, this tsensor is used for SoC thermal control, it supports alarm interrupt. Signed-off-by: Kevin Wangtao --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 7/9] dt-bindings: Document the hi3660 thermal sensor binding

2017-09-22 Thread Tao Wang
From: Kevin Wangtao This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Kevin Wangtao --- Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH 8/9] thermal/drivers/hisi: add support for hi3660 SoC

2017-09-22 Thread Tao Wang
From: Kevin Wangtao This patch adds the support for thermal sensor of Hi3660 SoC. Hi3660 tsensor support alarm interrupt and have three configurable alarm thresholds, it also has a configurable hysteresis interval, interrupt will be triggered when temperature rise above the alarm threshold or

[PATCH 5/9] thermal/drivers/hisi: perpare to add support for other hisi platform

2017-09-22 Thread Tao Wang
From: Kevin Wangtao For platform compatibility, add tsensor operation function pointer to thermal data, and each platform has its own probe function to register proper tsensor operation function to the pointer, platform related resource request are also implemented in the platform probe

[PATCH 1/9] thermal/drivers/hisi: move clk operation to related function

2017-09-22 Thread Tao Wang
From: Kevin Wangtao The sensor's clock is enabled and disabled outside of the probe and disable function. Moving the corresponding action in the hisi_thermal_setup() and hisi_thermal_disable_sensor(), factors out some lines of code and makes the code more symmetric. Signed-off-by: Kevin Wangtao

[PATCH 3/9] thermal/drivers/hisi: put platform code together

2017-09-22 Thread Tao Wang
From: Kevin Wangtao reorganize code for follow-up patch, there is no functional change here. Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 76 +- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git

[PATCH 2/9] thermal/drivers/hisi: use round up step value

2017-09-22 Thread Tao Wang
From: Kevin Wangtao Use round up divide to ensure the programmed value of threshold and lag not less than we set, and in order to keep the accuracy while using round up divide, the step value should also be a round up value. Then there is no need to use hisi_thermal_round_temp. Signed-off-by:

[PATCH 6/9] thermal/drivers/hisi: add support for multi temp threshold

2017-09-22 Thread Tao Wang
From: Kevin Wangtao tsensor may have multi alarm levels, so we can support more trip point interrupt. Signed-off-by: Kevin Wangtao --- drivers/thermal/hisi_thermal.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c

[PATCH v4 3/3] arm64: dts: register Hi3660's thermal sensor

2017-08-29 Thread Tao Wang
From: Tao Wang Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi| 14 + include/dt-bindings/thermal/hi3660-thermal.h | 31 2 files changed, 45 insertions(+) create

[PATCH v4 0/3] thermal: add thermal sensor driver for Hi3660

2017-08-29 Thread Tao Wang
From: Tao Wang This series adds thermal support for Hi3660 Soc, which support all the hardware temperture sensors and two virtual sensors(one for maximum value of all and one for average value of all). Patch 1 add dt-binding document to describe how to config dt for the driver. Patch 2

[PATCH v4 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-08-29 Thread Tao Wang
From: Tao Wang This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- drivers/thermal/Kconfig| 13 +++ drivers/thermal/Makefile

[PATCH v4 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-08-29 Thread Tao Wang
From: Tao Wang This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang --- .../devicetree/bindings/thermal/hisi-tsensor.txt | 37 ++ 1 file changed, 37 insertions(+) create mode 100644 Documentation

[PATCH v3 0/3] thermal: add thermal sensor driver for Hi3660

2017-08-10 Thread Tao Wang
From: Tao Wang This series adds thermal support for Hi3660 Soc, which support all the hardware temperture sensors and two virtual sensors(one for maximum value of all and one for average value of all). Patch 1 add dt-binding document to describe how to config dt for the driver. Patch 2

[PATCH v3 3/3] arm64: dts: register Hi3660's thermal sensor

2017-08-10 Thread Tao Wang
From: Tao Wang Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi| 10 ++ include/dt-bindings/thermal/hi3660-thermal.h | 30 2 files changed, 40 insertions(+) create

[PATCH v3 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-08-10 Thread Tao Wang
From: Tao Wang This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang --- .../devicetree/bindings/thermal/hisi-tsensor.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 Documentation

[PATCH v3 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-08-10 Thread Tao Wang
From: Tao Wang This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- drivers/thermal/Kconfig| 13 +++ drivers/thermal/Makefile

[PATCH] cpufreq: dt: Add support for hi3660

2017-05-23 Thread Tao Wang
Add the compatible string for supporting the generic device tree cpufreq-dt driver on Hisilicon's 3660 SoC. Signed-off-by: Tao Wang --- drivers/cpufreq/cpufreq-dt-platdev.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt

[Patch v2] cpufreq: dt: Add support for hi3660

2017-05-23 Thread Tao Wang
Add the compatible string for supporting the generic device tree cpufreq-dt driver on Hisilicon's 3660 SoC. Signed-off-by: Tao Wang --- Changes in v2: - changed order according to Viresh's suggestion drivers/cpufreq/cpufreq-dt-platdev.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-06-19 Thread Tao Wang
This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang --- .../devicetree/bindings/thermal/hi3660-thermal.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH 3/3] arm64: dts: register Hi3660's thermal sensor

2017-06-19 Thread Tao Wang
Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi |7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index 3983086

[PATCH 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-06-19 Thread Tao Wang
This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- drivers/thermal/Kconfig | 10 ++ drivers/thermal/Makefile |1

[Patch v2 1/3] dt-bindings: Document the hi3660 thermal sensor bindings

2017-06-21 Thread Tao Wang
This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Tao Wang --- Changes in v2: - remove redundant property .../devicetree/bindings/thermal/hi3660-thermal.txt | 16 1 file changed, 16 insertions(+) create mode

[Patch v2 2/3] thermal: hisilicon: add thermal sensor driver for Hi3660

2017-06-21 Thread Tao Wang
This patch adds the support for thermal sensor of Hi3660 SoC. this will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- Changes in v2: - correct alphabet order - correct compatible name drivers/thermal

[Patch v2 3/3] arm64: dts: register Hi3660's thermal sensor

2017-06-21 Thread Tao Wang
Bind thermal sensor driver for Hi3660. Signed-off-by: Tao Wang Signed-off-by: Leo Yan --- Changes in v2: - rebase changes on linux next arch/arm64/boot/dts/hisilicon/hi3660.dtsi |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch

[PATCH RFC 2/2] thermal/cpu idle cooling: cpu idle cooling cooperate with cpu cooling

2017-06-05 Thread Tao Wang
gaps between cpu OPPs. Signed-off-by: Tao Wang --- drivers/thermal/Kconfig| 17 drivers/thermal/cpu_cooling.c | 31 + drivers/thermal/cpu_idle_cooling.c |5 + include/linux/cpu_idle_cooling.h | 38

[PATCH RFC 1/2] thermal/cpu idle cooling: Introduce cpu idle cooling driver

2017-06-05 Thread Tao Wang
injection thread, idle injection thread use play_idle to enter idle. In order to reach deepest idle state, all cores are aligned by jiffies. the injected idle ratio can be controlled through cooling device interface. Signed-off-by: Tao Wang --- drivers/thermal/Kconfig| 13 + drivers