[PATCH 07/14] thermal/drivers/clock_cooling: Sort headers alphabetically

2020-05-11 Thread Amit Kucheria
Sort headers to make it easier to read and find duplicate headers. Signed-off-by: Amit Kucheria --- drivers/thermal/clock_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/clock_cooling.c b/drivers/thermal/clock_cooling.c index 7cb3ae4b44ee

Re: [PATCH v4 00/12] DDR/L3 Scaling support on SDM845 and SC7180 SoCs

2020-05-06 Thread Amit Kucheria
On Tue, May 5, 2020 at 1:54 AM Sibi Sankar wrote: > > This patch series aims to extend cpu based scaling support to L3/DDR on > SDM845 and SC7180 SoCs. > > Patches [1-3] - Blacklist SDM845 and SC7180 in cpufreq-dt-platdev > Patches [4-8] - Update bw levels based on cpu frequency change > Patches [

Re: [PATCH v4 03/12] cpufreq: blacklist SC7180 in cpufreq-dt-platdev

2020-05-06 Thread Amit Kucheria
On Tue, May 5, 2020 at 1:54 AM Sibi Sankar wrote: > > Add SC7180 to cpufreq-dt-platdev blacklist since the actual scaling is > handled by the 'qcom-cpufreq-hw' driver. > > Reviewed-by: Matthias Kaehlcke > Signed-off-by: Sibi Sankar Reviewed-by: Amit Kucheria >

Re: [PATCH v4 01/12] arm64: dts: qcom: sdm845: Add SoC compatible to MTP

2020-05-06 Thread Amit Kucheria
On Tue, May 5, 2020 at 1:54 AM Sibi Sankar wrote: > > Add missing SoC compatible to SDM845 MTP board file. > > Reviewed-by: Matthias Kaehlcke > Signed-off-by: Sibi Sankar Reviewed-by: Amit Kucheria > --- > > v4: > * Picked up R-b from Matthias > > arch/a

Re: [PATCH v4 02/12] cpufreq: blacklist SDM845 in cpufreq-dt-platdev

2020-05-06 Thread Amit Kucheria
On Tue, May 5, 2020 at 1:54 AM Sibi Sankar wrote: > > Add SDM845 to cpufreq-dt-platdev blacklist since the actual scaling is > handled by the 'qcom-cpufreq-hw' driver. > > Reviewed-by: Matthias Kaehlcke > Signed-off-by: Sibi Sankar Reviewed-by: Amit Kucheria

Re: [PATCH v4 4/4] thermal: cpuidle: Register cpuidle cooling device

2020-05-06 Thread Amit Kucheria
> state node pointer as a cooling device. The thermal framework will do > the association automatically with the thermal zone via the > cooling-device defined in the device tree cooling-maps section. > > Signed-off-by: Daniel Lezcano Conditionally, Reviewed-by: Amit Kucheria &

Re: [PATCH v4 1/4] powercap/drivers/idle_inject: Specify idle state max latency

2020-05-06 Thread Amit Kucheria
> Allow finer control of the idle injection mechanism by allowing to > specify the latency for the idle state. Thus the cooling device has > the ability to have a guarantee on the exit latency of the idle states > it is injecting. > > Acked-by: Rafael J. Wysocki > Signe

Re: [PATCH v4 2/4] dt-bindings: thermal: Add the idle cooling device

2020-05-06 Thread Amit Kucheria
hout colliding with the cpufreq cooling > device which is based on the CPU node. In addition, it allows to have > the cpufreq cooling device and the idle cooling device to co-exist > together as shown in the example. > > Reviewed-by: Rob Herring > Signed-off-by: Daniel Lezcano

Re: [PATCH v4 3/4] thermal/drivers/cpuidle_cooling: Change the registration function

2020-05-06 Thread Amit Kucheria
the cpufreq cooling device is > also using it. Let initialize the cpuidle cooling device with the DT > binding. > > This was tested on: > - hikey960 > - hikey6220 > - rock960 > - db845c > > Acked-by: Viresh Kumar > Signed-off-by: Daniel Lezcano Reviewed-by: Ami

Re: [PATCH 0/2] Add 0C (zeorC) interrupt support to tsens driver

2020-05-05 Thread Amit Kucheria
Hi Manaf, Thanks for sending this. Typo: zeorc in subject line. On Tue, May 5, 2020 at 4:42 PM Manaf Meethalavalappu Pallikunhi wrote: > > Changes: > * Add zeroc interrupt support to tsens driver > * Update zeroc interrupt support in yaml > > Manaf Meethalavalappu Pallikunhi (2): > drivers:

Re: [PATCH 2/2] dt-bindings: thermal: tsens: Add zeroc interrupt support in yaml

2020-05-05 Thread Amit Kucheria
On Tue, May 5, 2020 at 4:43 PM Manaf Meethalavalappu Pallikunhi wrote: > > Add 0C (zeroc) interrupt support for tsens in yaml. > > Signed-off-by: Manaf Meethalavalappu Pallikunhi > --- > Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 7 +-- > 1 file changed, 5 insertions(+), 2 d

Re: [PATCH 1/2] drivers: thermal: tsens: Add 0C (zeorC) interrupt support

2020-05-05 Thread Amit Kucheria
Hi Manaf, Typo: fix zeorC in subject line. Please rebase this patch[1] on top of my patch merging tsens-common.c and tsens.c. [1] https://lore.kernel.org/linux-arm-msm/e30e2ba6fa5c007983afd4d7d4e0311c0b57917a.1588183879.git.amit.kuche...@linaro.org/ On Tue, May 5, 2020 at 4:42 PM Manaf Meethal

Re: [PATCH V3 2/4] iio: adc: Add PMIC7 ADC bindings

2020-05-05 Thread Amit Kucheria
level. > > In addition, add definitions for ADC channels and virtual channel > definitions (combination of ADC channel number and PMIC SID number) > per PMIC, to be used by ADC clients for PMIC7. > > Signed-off-by: Jishnu Prakash Reviewed-by: Amit Kucheria > --- > .../

Re: [PATCH V3 1/4] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format

2020-05-05 Thread Amit Kucheria
Hi Jishnu, It is nice to cc reviewers in the followup versions. Just noticed this. On Mon, Apr 27, 2020 at 6:55 PM Jishnu Prakash wrote: > > Convert the adc bindings from .txt to .yaml format. > > Signed-off-by: Jishnu Prakash Reviewed-by: Amit Kucheria > --- > .../devic

Re: [PATCH V3 3/4] iio: adc: Add support for PMIC7 ADC

2020-05-05 Thread Amit Kucheria
Hi Jishnu, It is nice to cc a reviewer from a previous version. Just saw this. On Mon, Apr 27, 2020 at 6:55 PM Jishnu Prakash wrote: > > The ADC architecture on PMIC7 is changed as compared to PMIC5. The > major change from PMIC5 is that all SW communication to ADC goes through > PMK8350, which

Re: [PATCH 1/2] thermal: qcom: tsens-v0_1: Add support for MSM8939

2020-05-03 Thread Amit Kucheria
On Sat, May 2, 2020 at 2:03 AM Konrad Dybcio wrote: > > Signed-off-by: Konrad Dybcio > --- > drivers/thermal/qcom/tsens-v0_1.c | 142 +- > drivers/thermal/qcom/tsens.c | 3 + > drivers/thermal/qcom/tsens.h | 2 +- > 3 files changed, 145 insertions(+), 2

Re: [PATCH 2/2] dt-bindings: tsens: qcom: Document MSM8939 compatible

2020-05-03 Thread Amit Kucheria
On Sat, May 2, 2020 at 2:03 AM Konrad Dybcio wrote: > > Signed-off-by: Konrad Dybcio Reviewed-by: Amit Kucheria > --- > Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/th

[PATCH] drivers: thermal: tsens: Merge tsens-common.c into tsens.c

2020-04-29 Thread Amit Kucheria
rward declarations in tsens.h. - Add a Linaro copyright to tsens.c. - Fixup the Makefile to remove tsens-common.c. - Where it made sense, fix some 80-column alignments in the tsens-common.c code being copied over. There is no functional change with this patch. Signed-off-by: Amit Kucheria --- dr

Re: [PATCH V3] dt-bindings: thermal: Convert i.MX8MM to json-schema

2020-04-28 Thread Amit Kucheria
On Tue, Apr 21, 2020 at 7:37 PM Anson Huang wrote: > > Convert the i.MX8MM thermal binding to DT schema format using json-schema > > Signed-off-by: Anson Huang Reviewed-by: Amit Kucheria > --- > Changes since V2: > - drop unnecessary description for reg/clocks

Re: [PATCH v2] thermal: ti-soc-thermal: avoid dereferencing ERR_PTR

2020-04-28 Thread Amit Kucheria
vert a check to IS_ERR_OR_NULL. > > Signed-off-by: Sudip Mukherjee Reviewed-by: Amit Kucheria > --- > drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-

Re: [PATCH V2] thermal: imx: Add missing of_node_put()

2020-04-28 Thread Amit Kucheria
On Thu, Mar 26, 2020 at 8:06 PM Anson Huang wrote: > > After finishing using cpu node got from of_get_cpu_node(), of_node_put() > needs to be called. > > Signed-off-by: Anson Huang > --- > Changes since V1: > - improve the logic, no need to use got. > --- > drivers/thermal/imx_thermal.c

Re: [PATCH][next] thermal: qcom: tsens-v1: fix kfree of a non-pointer value

2019-10-22 Thread Amit Kucheria
On Tue, Oct 22, 2019 at 4:48 PM Colin King wrote: > > From: Colin Ian King > > Currently the kfree of pointer qfprom_cdata is kfreeing an > error value that has been cast to a pointer rather than a > valid address. Fix this by removing the kfree. Hmm, we just added this to other places[1] as a

Re: linux-next: build warning after merge of the thermal tree

2019-10-22 Thread Amit Kucheria
(Resending since Gmail mobile client converts email to HTML) Hi Stephen, On Tue, Oct 22, 2019 at 4:53 AM Stephen Rothwell wrote: > > Hi all, > > After merging the thermal tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > In file included from drivers/thermal/qcom/

[PATCH v5 2/6] thermal: Initialize thermal subsystem earlier

2019-10-21 Thread Amit Kucheria
Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/thermal/thermal_core.c | 2 +- 1 file

[PATCH v5 1/6] thermal: Remove netlink support

2019-10-21 Thread Amit Kucheria
There are no users of netlink messages for thermal inside the kernel. Remove the code and adjust the documentation. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- .../driver-api/thermal/sysfs-api.rst | 26 ++--- drivers/thermal/thermal_core.c| 101

[PATCH v5 3/6] cpufreq: Initialize the governors in core_initcall

2019-10-21 Thread Amit Kucheria
Initialize the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Rafael J. Wysocki --- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 2

[PATCH v5 4/6] cpufreq: Initialize cpufreq-dt driver earlier

2019-10-21 Thread Amit Kucheria
This allows HW drivers that depend on cpufreq-dt to initialize earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq

[PATCH v5 6/6] cpufreq: qcom-hw: Move driver initialization earlier

2019-10-21 Thread Amit Kucheria
Allow qcom-hw driver to initialize right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano Acked-by: Taniya Das Acked-by: Viresh Kumar --- drivers/cpufreq/qcom

[PATCH v5 5/6] clk: qcom: Initialize clock drivers earlier

2019-10-21 Thread Amit Kucheria
Initialize the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria Acked-by: Stephen Boyd Acked-by: Viresh Kumar --- drivers/clk/qcom/clk-rpmh.c | 2 +- drivers/clk/qcom/gcc-qcs404.c | 2 +- drivers/clk

[PATCH v6 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-10-21 Thread Amit Kucheria
Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index

[PATCH v6 11/15] arm64: dts: qcs404: thermal: Add interrupt support

2019-10-21 Thread Amit Kucheria
Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index a97eeb4569c00..b6a4e60739362

[PATCH v6 14/15] drivers: thermal: tsens: Create function to return sign-extended temperature

2019-10-21 Thread Amit Kucheria
Hide the details of how to convert values read from TSENS HW to mCelsius behind a function. All versions of the IP can be supported as a result. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 49 - 1 file changed, 35

[PATCH v6 12/15] arm: dts: msm8974: thermal: Add interrupt support

2019-10-21 Thread Amit Kucheria
Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria Tested-by: Brian Masney --- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index

[PATCH v6 13/15] arm64: dts: msm8916: thermal: Add interrupt support

2019-10-21 Thread Amit Kucheria
Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8686e101905cc..807f86a4535e0

[PATCH v6 15/15] drivers: thermal: tsens: Add interrupt support

2019-10-21 Thread Amit Kucheria
status and clear. These differences are handled transparently by the interrupt handler. At each interrupt, we reprogram the new upper and lower threshold in the .set_trip callback. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 377

[PATCH v6 00/15] thermal: qcom: tsens: Add interrupt support

2019-10-21 Thread Amit Kucheria
platform_get_irq_byname(). Add interrupt support to TSENS. The first 6 patches are general fixes and cleanups to the driver before interrupt support is introduced. [1] https://lore.kernel.org/linux-arm-msm/1b53ef537203e629328285b4597a09e4a586d688.1571181041.git.amit.kuche...@linaro.org/ Amit Kuch

[PATCH v6 01/15] drivers: thermal: tsens: Get rid of id field in tsens_sensor

2019-10-21 Thread Amit Kucheria
-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-8960.c | 4 ++-- drivers/thermal/qcom/tsens-common.c | 16 +--- drivers/thermal/qcom/tsens.c| 11 +-- drivers/thermal/qcom/tsens.h| 10 -- 4

[PATCH v6 02/15] drivers: thermal: tsens: Simplify code flow in tsens_probe

2019-10-21 Thread Amit Kucheria
Move platform_set_drvdata up to avoid an extra 'if (ret)' check after the call to tsens_register. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) di

[PATCH v6 10/15] arm64: dts: msm8998: thermal: Add interrupt support

2019-10-21 Thread Amit Kucheria
Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi

[PATCH v6 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor

2019-10-21 Thread Amit Kucheria
msm8974 has 11 sensors connected to a single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria Tested-by: Brian Masney Reviewed-by: Stephen Boyd --- arch/arm/boot/dts/qcom-msm8974.dtsi | 90

[PATCH v6 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors

2019-10-21 Thread Amit Kucheria
msm8916 uses sensors 0, 1, 2, 4 and 5. Sensor 3 is NOT used. Fixup the device tree so that the correct sensor ID is used and as a result we can actually check the temperature for the cpu2_3 sensor. Signed-off-by: Amit Kucheria Reviewed-by: Daniel Lezcano Reviewed-by: Stephen Boyd --- arch

[PATCH v6 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema

2019-10-21 Thread Amit Kucheria
Older IP only supports the 'uplow' interrupt, but newer IP supports 'uplow' and 'critical' interrupts. Document interrupt support in the tsens driver by converting over to a YAML schema. Suggested-by: Stephen Boyd Signed-off-by: Amit Kucheria Reviewed-by: Rob Herr

[PATCH v6 04/15] drivers: thermal: tsens: Add debugfs support

2019-10-21 Thread Amit Kucheria
404000 Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 83 + drivers/thermal/qcom/tsens.c| 2 + drivers/thermal/qcom/tsens.h| 6 +++ 3 files changed, 91 insertions(+) diff --git a/drivers/thermal

[PATCH v6 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements

2019-10-21 Thread Amit Kucheria
Printing the function name when enabling debugging makes logs easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-common.c | 8 drivers/thermal/qcom/tsens.c| 6 +++--- 2 files changed, 7 insertions

[PATCH v6 08/15] arm64: dts: sdm845: thermal: Add interrupt support

2019-10-21 Thread Amit Kucheria
Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845

Re: [PATCH v4 4/6] cpufreq: Initialize cpufreq-dt driver earlier

2019-10-21 Thread Amit Kucheria
On Mon, Oct 21, 2019 at 1:38 PM Ingo Molnar wrote: > > > * Amit Kucheria wrote: > > > This allows HW drivers that depend on cpufreq-dt to initialise earlier. > > My obsessive-compulsive in-brain spellchecker noticed that the title says > 'initialize'

[PATCH v4 3/6] cpufreq: Initialise the governors in core_initcall

2019-10-18 Thread Amit Kucheria
Initialise the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 2 +- drivers/cpufreq/cpufreq_performance.c

[PATCH v4 6/6] cpufreq: qcom-hw: Move driver initialisation earlier

2019-10-18 Thread Amit Kucheria
Allow qcom-hw driver to initialise right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano Acked-by: Taniya Das --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file

[PATCH v4 1/6] thermal: Remove netlink support

2019-10-18 Thread Amit Kucheria
There are no users of netlink messages for thermal inside the kernel. Remove the code and adjust the documentation. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- .../driver-api/thermal/sysfs-api.rst | 26 ++--- drivers/thermal/thermal_core.c| 101

[PATCH v4 2/6] thermal: Initialize thermal subsystem earlier

2019-10-18 Thread Amit Kucheria
Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/thermal/thermal_core.c | 2 +- 1 file

[PATCH v4 0/6] Initialise thermal framework and cpufreq earlier during boot

2019-10-18 Thread Amit Kucheria
be initialised earlier to act as the cooling devices. This series only converts over the qcom-hw driver to initialize earlier but can be extended to other platforms as well. Amit Kucheria (6): thermal: Remove netlink support thermal: Initialize thermal subsystem earlier cpufreq: Initialise t

[PATCH v4 4/6] cpufreq: Initialize cpufreq-dt driver earlier

2019-10-18 Thread Amit Kucheria
This allows HW drivers that depend on cpufreq-dt to initialise earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq

[PATCH v4 5/6] clk: qcom: Initialise clock drivers earlier

2019-10-18 Thread Amit Kucheria
Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria Acked-by: Stephen Boyd --- drivers/clk/qcom/clk-rpmh.c | 2 +- drivers/clk/qcom/gcc-qcs404.c | 2 +- drivers/clk/qcom/gcc-sdm845.c | 2

Re: [PATCH v3 3/6] cpufreq: Initialise the governors in core_initcall

2019-10-17 Thread Amit Kucheria
On Fri, Oct 18, 2019 at 12:41 AM Rafael J. Wysocki wrote: > > On Thu, Oct 17, 2019 at 2:28 PM Amit Kucheria > wrote: > > > > Initialise the cpufreq governors earlier to allow for earlier > > performance control during the boot process. > > > > Signed-off-

[PATCH v3 5/6] clk: qcom: Initialise clock drivers earlier

2019-10-17 Thread Amit Kucheria
Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria --- drivers/clk/qcom/clk-rpmh.c | 2 +- drivers/clk/qcom/gcc-qcs404.c | 2 +- drivers/clk/qcom/gcc-sdm845.c | 2 +- 3 files changed, 3

[PATCH v3 6/6] cpufreq: qcom-hw: Move driver initialisation earlier

2019-10-17 Thread Amit Kucheria
Allow qcom-hw driver to initialise right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion

[PATCH v3 0/6] Initialise thermal framework and cpufreq earlier during boot

2019-10-17 Thread Amit Kucheria
lier but can be extended to other platforms as well. Amit Kucheria (6): thermal: Remove netlink support thermal: Initialize thermal subsystem earlier cpufreq: Initialise the governors in core_initcall cpufreq: Initialize cpufreq-dt driver earlier clk: qcom: Initialise clock drivers earlier c

[PATCH v3 2/6] thermal: Initialize thermal subsystem earlier

2019-10-17 Thread Amit Kucheria
Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. Signed-off-by: Amit Kucheria --- drivers/thermal/thermal_core.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v3 4/6] cpufreq: Initialize cpufreq-dt driver earlier

2019-10-17 Thread Amit Kucheria
This allows HW drivers that depend on cpufreq-dt to initialise earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq

[PATCH v3 1/6] thermal: Remove netlink support

2019-10-17 Thread Amit Kucheria
There are no users of netlink messages for thermal inside the kernel. Remove the code and adjust the documentation. Signed-off-by: Amit Kucheria --- .../driver-api/thermal/sysfs-api.rst | 26 + drivers/thermal/thermal_core.c| 107 +- include/linux

[PATCH v3 3/6] cpufreq: Initialise the governors in core_initcall

2019-10-17 Thread Amit Kucheria
Initialise the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 2 +- drivers/cpufreq/cpufreq_performance.c

Re: [PATCH v2 0/5] Initialise thermal framework and cpufreq earlier during boot

2019-10-17 Thread Amit Kucheria
This is embarassing. I generated this series incorrectly. It is missing a patch removing netlink support. v3 coming right up. Sorry for the noise. On Thu, Oct 17, 2019 at 4:00 PM Amit Kucheria wrote: > > Changes since v1: > - Completely get rid of netlink support in the thermal

[PATCH v2 3/5] cpufreq: Initialize cpufreq-dt driver earlier

2019-10-17 Thread Amit Kucheria
This allows HW drivers that depend on cpufreq-dt to initialise earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq

[PATCH v2 1/5] thermal: Initialize thermal subsystem earlier

2019-10-17 Thread Amit Kucheria
Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. Signed-off-by: Amit Kucheria --- drivers/thermal/thermal_core.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 2/5] cpufreq: Initialise the governors in core_initcall

2019-10-17 Thread Amit Kucheria
Initialise the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 2 +- drivers/cpufreq/cpufreq_performance.c

[PATCH v2 4/5] clk: qcom: Initialise clock drivers earlier

2019-10-17 Thread Amit Kucheria
Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria --- drivers/clk/qcom/clk-rpmh.c | 2 +- drivers/clk/qcom/gcc-qcs404.c | 2 +- drivers/clk/qcom/gcc-sdm845.c | 2 +- 3 files changed, 3

[PATCH v2 5/5] cpufreq: qcom-hw: Move driver initialisation earlier

2019-10-17 Thread Amit Kucheria
Allow qcom-hw driver to initialise right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 0/5] Initialise thermal framework and cpufreq earlier during boot

2019-10-17 Thread Amit Kucheria
n initialize it earlier to enable thermal mitigation during boot. We also need the cpufreq HW drivers to be initialised earlier to act as the cooling devices. This series only converts over the qcom-hw driver to initialize earlier but can be extended to other platforms as well. Amit Kucheria

Re: [PATCH] thermal: create softlink by name for thermal_zone and cooling_device

2019-10-16 Thread Amit Kucheria
On Wed, Oct 16, 2019 at 10:20 PM Amit Kucheria wrote: > > On Tue, Oct 15, 2019 at 11:43 AM Wei Wang wrote: > > > > The paths thermal_zone%d and cooling_device%d are not intuitive and the > > numbers are subject to change due to device tree change. This usually > &

Re: [PATCH] thermal: create softlink by name for thermal_zone and cooling_device

2019-10-16 Thread Amit Kucheria
On Tue, Oct 15, 2019 at 11:43 AM Wei Wang wrote: > > The paths thermal_zone%d and cooling_device%d are not intuitive and the > numbers are subject to change due to device tree change. This usually > leads to tree traversal in userspace code. > The patch creates `tz-by-name' and `cdev-by-name' for

Re: [PATCH v7 5/7] arm64: dts: amlogic: g12a: add cooling properties

2019-10-16 Thread Amit Kucheria
e La Roque Reviewed-by: Amit Kucheria > --- > arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 24 + > 1 file changed, 24 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi > b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi > index 7

Re: [PATCH v7 6/7] arm64: dts: amlogic: g12b: add cooling properties

2019-10-16 Thread Amit Kucheria
e La Roque Reviewed-by: Amit Kucheria > --- > arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi > b/arch/arm64/boot/dts/amlogic/meson-g12b.dtsi > index 9

Re: [PATCH v7 4/7] arm64: dts: meson: g12: Add minimal thermal zone

2019-10-16 Thread Amit Kucheria
l Armstrong > Tested-by: Christian Hewitt > Tested-by: Kevin Hilman > Signed-off-by: Guillaume La Roque Reviewed-by: Amit Kucheria > --- > .../boot/dts/amlogic/meson-g12-common.dtsi| 57 +++ > 1 file changed, 57 insertions(+) > > diff --git a/arch

Re: [PATCH 00/15] thermal: qcom: tsens: Add interrupt support

2019-10-16 Thread Amit Kucheria
On Wed, Oct 16, 2019 at 1:29 PM Daniel Lezcano wrote: > > On 16/10/2019 09:33, Amit Kucheria wrote: > > Hi Thermal and MSM maintainers, > > > > I believe this series is now ready to be merged. The DT bindings and driver > > changes should go through the thermal

Re: [PATCH] arm64: defconfig: Enable Qualcomm CPUfreq HW driver

2019-10-16 Thread Amit Kucheria
rn Andersson You beat me to it. :-) Acked-by: Amit Kucheria > --- > arch/arm64/configs/defconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig > index dea051a64257..45e55dfe1ee4 100644 > --- a/arch/arm

[PATCH 10/15] arm64: dts: msm8998: thermal: Add interrupt support

2019-10-16 Thread Amit Kucheria
Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi

[PATCH 14/15] drivers: thermal: tsens: Create function to return sign-extended temperature

2019-10-16 Thread Amit Kucheria
Hide the details of how to convert values read from TSENS HW to mCelsius behind a function. All versions of the IP can be supported as a result. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 49 - 1 file changed, 35

[PATCH 15/15] drivers: thermal: tsens: Add interrupt support

2019-10-16 Thread Amit Kucheria
status and clear. These differences are handled transparently by the interrupt handler. At each interrupt, we reprogram the new upper and lower threshold in the .set_trip callback. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 377

[PATCH 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements

2019-10-16 Thread Amit Kucheria
Printing the function name when enabling debugging makes logs easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-common.c | 8 drivers/thermal/qcom/tsens.c| 6 +++--- 2 files changed, 7 insertions

[PATCH 12/15] arm: dts: msm8974: thermal: Add interrupt support

2019-10-16 Thread Amit Kucheria
Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria Tested-by: Brian Masney --- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index

[PATCH 00/15] thermal: qcom: tsens: Add interrupt support

2019-10-16 Thread Amit Kucheria
support is introduced. [1] https://lore.kernel.org/linux-arm-msm/1b53ef537203e629328285b4597a09e4a586d688.1571181041.git.amit.kuche...@linaro.org/ Amit Kucheria (15): drivers: thermal: tsens: Get rid of id field in tsens_sensor drivers: thermal: tsens: Simplify code flow in tsens_probe dr

[PATCH 11/15] arm64: dts: qcs404: thermal: Add interrupt support

2019-10-16 Thread Amit Kucheria
Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index a97eeb4569c0..b6a4e6073936

[PATCH 01/15] drivers: thermal: tsens: Get rid of id field in tsens_sensor

2019-10-16 Thread Amit Kucheria
-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-8960.c | 4 ++-- drivers/thermal/qcom/tsens-common.c | 16 +--- drivers/thermal/qcom/tsens.c| 11 +-- drivers/thermal/qcom/tsens.h| 10 -- 4

[PATCH 13/15] arm64: dts: msm8916: thermal: Add interrupt support

2019-10-16 Thread Amit Kucheria
Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8686e101905c..807f86a4535e

[PATCH 08/15] arm64: dts: sdm845: thermal: Add interrupt support

2019-10-16 Thread Amit Kucheria
Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845

[PATCH 05/15] arm: dts: msm8974: thermal: Add thermal zones for each sensor

2019-10-16 Thread Amit Kucheria
msm8974 has 11 sensors connected to a single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria Tested-by: Brian Masney Reviewed-by: Stephen Boyd --- arch/arm/boot/dts/qcom-msm8974.dtsi | 90

[PATCH 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-10-16 Thread Amit Kucheria
Register upper-lower interrupts for each of the two tsens controllers. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 87f4d9c1b0d4

[PATCH 07/15] dt-bindings: thermal: tsens: Convert over to a yaml schema

2019-10-16 Thread Amit Kucheria
Older IP only supports the 'uplow' interrupt, but newer IP supports 'uplow' and 'critical' interrupts. Document interrupt support in the tsens driver by converting over to a YAML schema. Suggested-by: Stephen Boyd Signed-off-by: Amit Kucheria Reviewed-by: Rob Herr

[PATCH 04/15] drivers: thermal: tsens: Add debugfs support

2019-10-16 Thread Amit Kucheria
404000 Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/thermal/qcom/tsens-common.c | 83 + drivers/thermal/qcom/tsens.c| 2 + drivers/thermal/qcom/tsens.h| 6 +++ 3 files changed, 91 insertions(+) diff --git a/drivers/thermal

[PATCH 06/15] arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors

2019-10-16 Thread Amit Kucheria
msm8916 uses sensors 0, 1, 2, 4 and 5. Sensor 3 is NOT used. Fixup the device tree so that the correct sensor ID is used and as a result we can actually check the temperature for the cpu2_3 sensor. Signed-off-by: Amit Kucheria Reviewed-by: Daniel Lezcano Reviewed-by: Stephen Boyd --- arch

[PATCH 02/15] drivers: thermal: tsens: Simplify code flow in tsens_probe

2019-10-16 Thread Amit Kucheria
Move platform_set_drvdata up to avoid an extra 'if (ret)' check after the call to tsens_register. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) di

Re: [PATCH] of-thermal: Disable polling when interrupt property is found in DT

2019-10-15 Thread Amit Kucheria
On Wed, Oct 16, 2019 at 10:27 AM Stephen Boyd wrote: > > Quoting Amit Kucheria (2019-10-15 16:13:16) > > Currently, in order to enable interrupt-only mode, one must set > > polling-delay-passive and polling-delay properties in the DT to 0, > > otherwise the thermal fr

Re: [PATCH v7 4/7] arm64: dts: meson: g12: Add minimal thermal zone

2019-10-15 Thread Amit Kucheria
On Fri, Oct 4, 2019 at 2:31 PM Guillaume La Roque wrote: > > Add minimal thermal zone for two temperature sensor > One is located close to the DDR and the other one is > located close to the PLLs (between the CPU and GPU) > > Acked-by: Martin Blumenstingl > Reviewed-by: Neil Armstrong > Tested-b

[PATCH] of-thermal: Disable polling when interrupt property is found in DT

2019-10-15 Thread Amit Kucheria
ice_update3 thermal_zone_device_set_pollin6 With this patch (without setting delay properties to 0): FUNC COUNT thermal_zone_device_update3 thermal_zone_device_set_pollin6 Suggested-by: Stephen Boyd Signed-off-by: Ami

Re: [PATCH 05/11] thermal: Move set_trips function to the internal header

2019-10-14 Thread Amit Kucheria
On Sat, Oct 12, 2019 at 12:23 PM Daniel Lezcano wrote: > > The function is not used in other place than the thermal directory. It Grammar nit: is not used any place other than the thermal directory > does not make sense to export its definition in the global header as > there is no use of it. >

Re: [PATCH 11/11] thermal: Move thermal governor structure to internal header

2019-10-14 Thread Amit Kucheria
On Sat, Oct 12, 2019 at 12:23 PM Daniel Lezcano wrote: > > The thermal governor structure is a big structure where no > user should change value inside except via helper functions. > > Move the structure to the internal header thus preventing external > code to be tempted by hacking the structure'

Re: [PATCH] media: dt-bindings: media: Fixup Allwinner A10 CSI binding

2019-10-07 Thread Amit Kucheria
On Mon, Oct 7, 2019 at 3:35 PM Maxime Ripard wrote: > > On Sat, Oct 05, 2019 at 04:15:57PM +0530, Amit Kucheria wrote: > > On Thu, Oct 3, 2019 at 5:22 PM Maxime Ripard wrote: > > > > > > Hi, > > > > > > On Thu, Oct 03, 2019 at 04:52:24PM +0530, Ami

Re: [PATCH] media: dt-bindings: media: Fixup Allwinner A10 CSI binding

2019-10-05 Thread Amit Kucheria
On Thu, Oct 3, 2019 at 5:22 PM Maxime Ripard wrote: > > Hi, > > On Thu, Oct 03, 2019 at 04:52:24PM +0530, Amit Kucheria wrote: > > This new binding fails dt_binding_check due to a typo. Fix it up. > > > > linux.git/Documentation/devicetree/bindings/media/allwinne

Re: [PATCH] arm64: dts: qcom: msm8998-clamshell: Remove retention idle state

2019-10-03 Thread Amit Kucheria
; in boot hangs. Therefore, remove the state from use to address the > observed issues. > > Fixes: 2c6d2d3a580a (arm64: dts: qcom: Add Lenovo Miix 630) > Signed-off-by: Jeffrey Hugo Reviewed-by: Amit Kucheria > --- > .../boot/dts/qcom/msm8998-clamshell.dtsi | 37

Re: [PATCH v2 7/9] arm64: dts: qcom: msm8998: Add PSCI cpuidle low power states

2019-10-03 Thread Amit Kucheria
On Wed, Oct 2, 2019 at 11:48 PM Jeffrey Hugo wrote: > > On Wed, Oct 2, 2019 at 3:27 AM Niklas Cassel wrote: > > > > On Wed, Oct 02, 2019 at 11:19:50AM +0200, Niklas Cassel wrote: > > > On Mon, Sep 30, 2019 at 04:20:15PM -0600, Jeffrey Hugo wrote: > > > > Amit, the merged version of the below chan

<    1   2   3   4   5   6   7   8   9   10   >