[PATCH v1 16/24] drivers: thermal: tsens: Introduce IP-specific max_sensor count

2019-02-07 Thread Amit Kucheria
The IP can support 'm' sensors while the platform can enable 'n' sensors of the 'm' where n <= m. Track maximum sensors supported by the IP so that we can correctly track what subset of the sensors are supported on the platform. Signed-off-by: Amit Kucheria

[PATCH v1 05/24] drivers: thermal: tsens: Use consistent names for variables

2019-02-07 Thread Amit Kucheria
tsens_get_temp() uses the name 'data' for the void pointer, use the same in tsens_get_trend() for consistency. Remove a stray space while we're at it. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v1 04/24] drivers: thermal: tsens: Rename variable tmdev

2019-02-07 Thread Amit Kucheria
tmdev seems to imply that this is a device pointer when in fact it is just private platform data for each tsens device. Rename it to priv improve code readability. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-8916.c | 16 +++--- drivers/thermal/qcom/tsens-8960.c | 82

[PATCH v1 03/24] drivers: thermal: tsens: Rename tsens_device

2019-02-07 Thread Amit Kucheria
Rename to tsens_priv to denote that it is private data for each tsens instance. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-8916.c | 2 +- drivers/thermal/qcom/tsens-8960.c | 14 +++--- drivers/thermal/qcom/tsens-8974.c | 2 +- drivers/thermal/qcom/tsens-common.c

[PATCH v1 01/24] drivers: thermal: tsens: Document the data structures

2019-02-07 Thread Amit Kucheria
Describe how the TSENS device and the various sensors connected to it are described in the driver Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.h | 31 --- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/qcom/tsens.h b

[PATCH v1 02/24] drivers: thermal: tsens: Rename tsens_data

2019-02-07 Thread Amit Kucheria
Rename to tsens_plat_data to denote that it is platform-data passed in at compile-time. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-8916.c | 2 +- drivers/thermal/qcom/tsens-8960.c | 2 +- drivers/thermal/qcom/tsens-8974.c | 2 +- drivers/thermal/qcom/tsens-v2.c | 4

[PATCH v1 00/24] thermal: tsens: Refactor to use regmap_field

2019-02-07 Thread Amit Kucheria
valid b. irq support c. Convert over 8960 to use regmap_field and as a result common functions Regards, Amit Amit Kucheria (24): drivers: thermal: tsens: Document the data structures drivers: thermal: tsens: Rename tsens_data drivers: thermal: tsens: Rename tsens_device drivers: thermal: ts

Re: [PATCH v3 1/1] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-02-06 Thread Amit Kucheria
On Thu, Feb 7, 2019 at 7:27 AM Matthias Kaehlcke wrote: > > On Wed, Feb 06, 2019 at 11:34:41AM -0800, Matthias Kaehlcke wrote: > > On Wed, Feb 06, 2019 at 04:05:41PM +0530, Amit Kucheria wrote: > > > On Sat, Jan 26, 2019 at 3:50 AM Matthias K

Re: [PATCH v3 1/1] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-02-06 Thread Amit Kucheria
On Sat, Jan 26, 2019 at 3:50 AM Matthias Kaehlcke wrote: > > > > trips { > > > > - cpu_alert0: trip0 { > > > > + cpu0_alert1: trip-point@0 { > > > > temperature = <75000>; > > > > > > In my observat

[PATCH v4 1/1] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-02-06 Thread Amit Kucheria
Since all cpus in the big and little clusters, respectively, are in the same frequency domain, use all of them for mitigation in the cooling-map. We end up with two cooling devices - one each for the big and little clusters. Signed-off-by: Amit Kucheria Acked-by: Eduardo Valentin --- arch

[PATCH v4 0/1] Thermal throttling for SDM845

2019-02-06 Thread Amit Kucheria
that trip, duh! [1] https://lore.kernel.org/lkml/cover.1548084260.git.amit.kuche...@linaro.org/ [2] https://lore.kernel.org/patchwork/patch/1033953/ [3] https://lore.kernel.org/patchwork/cover/1033970/ Amit Kucheria (1): arm64: dts: sdm845: wireup the thermal trip points to cpufreq arch/arm6

[PATCH] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-29 Thread Amit Kucheria
thermal_cooling_device pointer to struct cpufreq_policy so that drivers don't need to store it in a private data structure. Suggested-by: Stephen Boyd Suggested-by: Viresh Kumar Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Acked-by: Viresh

Re: [PATCH v5 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-29 Thread Amit Kucheria
On Tue, Jan 29, 2019 at 2:43 PM Rafael J. Wysocki wrote: > > On Tue, Jan 29, 2019 at 6:46 AM Amit Kucheria > wrote: > > > > On Tue, Jan 29, 2019 at 11:06 AM Viresh Kumar > > wrote: > > > > > > On 29-01-19, 10:25, Amit Kucheria wrote: > > &g

Re: [PATCH v5 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-28 Thread Amit Kucheria
On Tue, Jan 29, 2019 at 11:16 AM Amit Kucheria wrote: > > On Tue, Jan 29, 2019 at 11:06 AM Viresh Kumar wrote: > > > > On 29-01-19, 10:25, Amit Kucheria wrote: > > > All cpufreq drivers do similar things to register as a cooling device. > > > Provide a cpufreq

Re: [PATCH v5 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-28 Thread Amit Kucheria
On Tue, Jan 29, 2019 at 11:06 AM Viresh Kumar wrote: > > On 29-01-19, 10:25, Amit Kucheria wrote: > > All cpufreq drivers do similar things to register as a cooling device. > > Provide a cpufreq driver flag so drivers can just ask the cpufreq core > > to register the

Re: [PATCH] drivers: qcom: rpmh: use struct_size() in kzalloc()

2019-01-28 Thread Amit Kucheria
nce = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Amit Kucheria > --- > drivers/soc/qcom/rpmh.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(

[PATCH v5 6/9] cpufreq: mediatek: Use auto-registration of thermal cooling device

2019-01-28 Thread Amit Kucheria
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers/cpufreq/mediatek-cpufreq.c

[PATCH v5 9/9] cpufreq: scpi: Use auto-registration of thermal cooling device

2019-01-28 Thread Amit Kucheria
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers

[PATCH v5 8/9] cpufreq: scmi: Use auto-registration of thermal cooling device

2019-01-28 Thread Amit Kucheria
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers

[PATCH v5 7/9] cpufreq: qoriq: Use auto-registration of thermal cooling device

2019-01-28 Thread Amit Kucheria
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers/cpufreq/qoriq-cpufreq.c | 15

[PATCH v5 5/9] cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device

2019-01-28 Thread Amit Kucheria
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers/cpufreq/cpufreq-dt.c | 14

[PATCH v5 4/9] cpufreq: imx6q: Use auto-registration of thermal cooling device

2019-01-28 Thread Amit Kucheria
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers/cpufreq/imx6q-cpufreq.c | 24

[PATCH v5 3/9] cpufreq: qcom-hw: Register as a cpufreq cooling device

2019-01-28 Thread Amit Kucheria
Add the CPUFREQ_IS_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Acked-by: Viresh Kumar Reviewed-by: Daniel Lezcano --- drivers

[PATCH v5 1/9] thermal: cpu_cooling: Require thermal core to be compiled in

2019-01-28 Thread Amit Kucheria
J. Wysocki Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig | 3 --- drivers/cpufreq/Kconfig.arm | 5 - drivers/thermal/Kconfig | 1 + 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/K

[PATCH v5 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-28 Thread Amit Kucheria
thermal_cooling_device pointer to struct cpufreq_policy so that drivers don't need to store it in a private data structure. Suggested-by: Stephen Boyd Suggested-by: Viresh Kumar Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Acked-by: Viresh

[PATCH v5 0/9] cpufreq: Add flag to auto-register as cooling device

2019-01-28 Thread Amit Kucheria
compilation failures with allmodconfig - Get rid of #ifdef in cpufreq.c - Removed miscellaneous patches and sent them separately - Merged patches 1 and 2 from v1 Amit Kucheria (9): thermal: cpu_cooling: Require thermal core to be compiled in cpufreq: Auto-register the driver as a thermal coo

Re: [PATCH v4 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-28 Thread Amit Kucheria
On Mon, Jan 28, 2019 at 5:34 PM Rafael J. Wysocki wrote: > > On Monday, January 28, 2019 9:32:44 AM CET Daniel Lezcano wrote: > > On 28/01/2019 07:41, Amit Kucheria wrote: > > > All cpufreq drivers do similar things to register as a cooling device. > > > Provide a

[PATCH v4 6/9] cpufreq: mediatek: Use auto-registration of thermal cooling device

2019-01-27 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/mediatek-cpufreq.c | 14 ++ 1 file changed, 2

[PATCH v4 8/9] cpufreq: scmi: Use auto-registration of thermal cooling device

2019-01-27 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla --- drivers/cpufreq/scmi-cpufreq.c | 14 ++ 1

[PATCH v4 9/9] cpufreq: scpi: Use auto-registration of thermal cooling device

2019-01-27 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 14 ++ 1

[PATCH v4 4/9] cpufreq: imx6q: Use auto-registration of thermal cooling device

2019-01-27 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/imx6q-cpufreq.c | 24 ++-- 1 file changed

[PATCH v4 7/9] cpufreq: qoriq: Use auto-registration of thermal cooling device

2019-01-27 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qoriq-cpufreq.c | 15 ++- 1 file changed, 2

[PATCH v4 5/9] cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device

2019-01-27 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq-dt.c | 14 ++ 1 file changed, 2 insertions

[PATCH v4 3/9] cpufreq: qcom-hw: Register as a cpufreq cooling device

2019-01-27 Thread Amit Kucheria
Add the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd --- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file

[PATCH v4 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-27 Thread Amit Kucheria
thermal_cooling_device pointer to struct cpufreq_policy so that drivers don't need to store it in a private data structure. Suggested-by: Stephen Boyd Suggested-by: Viresh Kumar Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke --- drivers/cpufreq/cpuf

[PATCH v4 1/9] thermal: cpu_cooling: Require thermal core to be compiled in

2019-01-27 Thread Amit Kucheria
J. Wysocki Signed-off-by: Amit Kucheria --- drivers/cpufreq/Kconfig | 3 --- drivers/cpufreq/Kconfig.arm | 5 - drivers/thermal/Kconfig | 1 + 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 608af20a3494..b22e6bba

[PATCH v4 0/9] cpufreq: Add flag to auto-register as cooling device

2019-01-27 Thread Amit Kucheria
patches 1 and 2 from v1 Amit Kucheria (9): thermal: cpu_cooling: Require thermal core to be compiled in cpufreq: Auto-register the driver as a thermal cooling device if asked cpufreq: qcom-hw: Register as a cpufreq cooling device cpufreq: imx6q: Use auto-registration of thermal cooling devic

Re: [PATCHv3 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-25 Thread Amit Kucheria
On Fri, Jan 25, 2019 at 4:01 PM Viresh Kumar wrote: > > On 25-01-19, 12:32, Amit Kucheria wrote: > > All cpufreq drivers do similar things to register as a cooling device. > > Provide a cpufreq driver flag so drivers can just ask the cpufreq core > > to register the coolin

[PATCHv3 9/9] cpufreq: scpi: Use auto-registration of thermal cooling device

2019-01-24 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 14 ++ 1

[PATCHv3 3/9] cpufreq: qcom-hw: Register as a cpufreq cooling device

2019-01-24 Thread Amit Kucheria
Add the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd --- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file

[PATCHv3 4/9] cpufreq: imx6q: Use auto-registration of thermal cooling device

2019-01-24 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/imx6q-cpufreq.c | 24 ++-- 1 file changed

[PATCHv3 8/9] cpufreq: scmi: Use auto-registration of thermal cooling device

2019-01-24 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla --- drivers/cpufreq/scmi-cpufreq.c | 14 ++ 1

[PATCHv3 7/9] cpufreq: qoriq: Use auto-registration of thermal cooling device

2019-01-24 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qoriq-cpufreq.c | 15 ++- 1 file changed, 2

[PATCHv3 5/9] cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device

2019-01-24 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq-dt.c | 14 ++ 1 file changed, 2 insertions

[PATCHv3 1/9] thermal: cpu_cooling: Require thermal core to be compiled in

2019-01-24 Thread Amit Kucheria
J. Wysocki Signed-off-by: Amit Kucheria --- drivers/cpufreq/Kconfig | 3 --- drivers/cpufreq/Kconfig.arm | 5 - drivers/thermal/Kconfig | 1 + 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 608af20a3494..b22e6bba

[PATCHv3 6/9] cpufreq: mediatek: Use auto-registration of thermal cooling device

2019-01-24 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/mediatek-cpufreq.c | 14 ++ 1 file changed, 2

[PATCHv3 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-24 Thread Amit Kucheria
thermal_cooling_device pointer to struct cpufreq_policy so that drivers don't need to store it in a private data structure. Suggested-by: Stephen Boyd Suggested-by: Viresh Kumar Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke --- drivers/cpufreq/cpuf

[PATCHv3 0/9] cpufreq: Add flag to auto-register as cooling device

2019-01-24 Thread Amit Kucheria
ig Changes since v1: - Fix compilation failures with allmodconfig - Get rid of #ifdef in cpufreq.c - Removed miscellaneous patches and sent them separately - Merged patches 1 and 2 from v1 Amit Kucheria (9): thermal: cpu_cooling: Require thermal core to be compiled in cpufreq: Auto-register the

Re: [PATCH RESEND] arm64: dts: msm8916: remove bogus argument to the cpu clock

2019-01-24 Thread Amit Kucheria
> > Fixes: 65afdf458360 ("arm64: dts: qcom: msm8916: Add CPU frequency scaling > support") > Signed-off-by: Niklas Cassel > Reviewed-by: Bjorn Andersson Reviewed-by: Amit Kucheria > --- > arch/arm64/boot/dts/qcom/msm8916.dtsi | 8 > 1 file changed, 4

Re: [PATCH v2 1/9] thermal: cpu_cooling: Require thermal core to be compiled in

2019-01-23 Thread Amit Kucheria
On Wed, Jan 23, 2019 at 4:04 PM Viresh Kumar wrote: > > On 21-01-19, 21:10, Amit Kucheria wrote: > > The CPU cooling driver (cpu_cooling.c) allows the platform's cpufreq > > driver to register as a cooling device and cool down the platform by > > throttling the CPU f

[PATCH v3 1/1] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-01-21 Thread Amit Kucheria
frequency. At the next trip point we allow ourselves to be throttled to any extent. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 225 +-- 1 file changed, 209 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch

Re: [PATCH v2 8/9] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-01-21 Thread Amit Kucheria
On Tue, Jan 15, 2019 at 3:31 AM Matthias Kaehlcke wrote: > > On Mon, Jan 14, 2019 at 03:51:10PM +0530, Amit Kucheria wrote: > > Since all cpus in the big and little clusters, respectively, are in the > > same frequency domain, use all of them for mitigation in the > > coo

[PATCH v3 0/1] Thermal throttling for SDM845

2019-01-21 Thread Amit Kucheria
/ [2] https://lore.kernel.org/patchwork/patch/1033953/ [3] https://lore.kernel.org/patchwork/cover/1033970/ Amit Kucheria (1): arm64: dts: sdm845: wireup the thermal trip points to cpufreq arch/arm64/boot/dts/qcom/sdm845.dtsi | 225 +-- 1 file changed, 209 insertions(+

[PATCH v2 9/9] cpufreq: scpi: Use auto-registration of thermal cooling device

2019-01-21 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 14 ++ 1

[PATCH v2 8/9] cpufreq: scmi: Use auto-registration of thermal cooling device

2019-01-21 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla --- drivers/cpufreq/scmi-cpufreq.c | 14 ++ 1

[PATCH v2 6/9] cpufreq: mediatek: Use auto-registration of thermal cooling device

2019-01-21 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/mediatek-cpufreq.c | 14 ++ 1 file changed, 2

[PATCH v2 7/9] cpufreq: qoriq: Use auto-registration of thermal cooling device

2019-01-21 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qoriq-cpufreq.c | 15 ++- 1 file changed, 2

[PATCH v2 5/9] cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device

2019-01-21 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq-dt.c | 14 ++ 1 file changed, 2 insertions

[PATCH v2 4/9] cpufreq: imx6q: Use auto-registration of thermal cooling device

2019-01-21 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/imx6q-cpufreq.c | 24 ++-- 1 file changed

[PATCH v2 3/9] cpufreq: qcom-hw: Register as a cpufreq cooling device

2019-01-21 Thread Amit Kucheria
Add the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd --- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file

[PATCH v2 2/9] cpufreq: Auto-register the driver as a thermal cooling device if asked

2019-01-21 Thread Amit Kucheria
thermal_cooling_device pointer to struct cpufreq_policy so that drivers don't need to store it in a private data structure. Suggested-by: Stephen Boyd Suggested-by: Viresh Kumar Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke --- drivers/cpufreq/cpuf

[PATCH v2 1/9] thermal: cpu_cooling: Require thermal core to be compiled in

2019-01-21 Thread Amit Kucheria
ually want it compiled-in so it is available early in boot, make CPU_THERMAL depend on THERMAL being compiled-in instead of allowing it to be a module. Suggested-by: Rafael J. Wysocki Signed-off-by: Amit Kucheria --- drivers/thermal/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PATCH v2 0/9] cpufreq: Add flag to auto-register as cooling

2019-01-21 Thread Amit Kucheria
ches 1 and 2 from v1 Amit Kucheria (9): thermal: cpu_cooling: Require thermal core to be compiled in cpufreq: Auto-register the driver as a thermal cooling device if asked cpufreq: qcom-hw: Register as a cpufreq cooling device cpufreq: imx6q: Use auto-registration of thermal cooling device

Re: [PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy

2019-01-21 Thread Amit Kucheria
On Thu, Jan 17, 2019 at 4:27 AM Rafael J. Wysocki wrote: > > On Monday, January 14, 2019 5:34:53 PM CET Amit Kucheria wrote: > > Several cpufreq drivers register themselves as thermal cooling devices. > > Adding a pointer to struct cpufreq_policy removes the need for them

Re: [PATCH v2 4/9] cpufreq: Add a flag to auto-register a cooling device

2019-01-21 Thread Amit Kucheria
On Tue, Jan 15, 2019 at 5:27 AM Stephen Boyd wrote: > > Quoting Amit Kucheria (2019-01-14 02:21:06) > > All cpufreq drivers do similar things to register as a cooling device. > > Provide a cpufreq driver flag so drivers can just ask the cpufreq core > > to register the

Re: [PATCH v1 02/10] cpufreq: Add a flag to auto-register a cooling device

2019-01-21 Thread Amit Kucheria
On Thu, Jan 17, 2019 at 10:12 AM Viresh Kumar wrote: > > On 17-01-19, 00:03, Rafael J. Wysocki wrote: > > On Monday, January 14, 2019 5:34:54 PM CET Amit Kucheria wrote: > > > All cpufreq drivers do similar things to register as a cooling device. > > > Provide a cpuf

Re: [PATCH v2 9/9] thermal: cpu_cooling: Clarify error message

2019-01-21 Thread Amit Kucheria
On Thu, Jan 17, 2019 at 4:04 PM Rafael J. Wysocki wrote: > > On Thu, Jan 17, 2019 at 6:57 AM Viresh Kumar wrote: > > > > On 14-01-19, 15:51, Amit Kucheria wrote: > > > Make it clear that it is a failure if the cpufreq driver was unable to > > > register as

[PATCH v1 2/2] thermal: cpu_cooling: Clarify error message

2019-01-21 Thread Amit Kucheria
Make it clear that it is a failure if the cpufreq driver was unable to register as a cooling device. Makes it easier to find in logs and grepping for words like fail, err, warn. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1

[PATCH v1 1/2] thermal: of-thermal: Print name of device node with error

2019-01-21 Thread Amit Kucheria
Make it easier to debug devicetree definition in case of errors. Signed-off-by: Amit Kucheria --- drivers/thermal/of-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 4bfdb4a1e47d..2df059cc07e2

[PATCH v1 0/2] thermal: trivial fixes to error messages

2019-01-21 Thread Amit Kucheria
Fix up a couple of error messages Amit Kucheria (2): thermal: of-thermal: Print name of device node with error thermal: cpu_cooling: Clarify error message drivers/thermal/cpu_cooling.c | 2 +- drivers/thermal/of-thermal.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions

Re: [PATCH v2 2/9] drivers: thermal: of-thermal: Print name of device node with error

2019-01-21 Thread Amit Kucheria
On Tue, Jan 15, 2019 at 5:24 AM Stephen Boyd wrote: > > Quoting Amit Kucheria (2019-01-14 02:21:04) > > Make it easier to debug devicetree definition in case of errors. > > > > Signed-off-by: Amit Kucheria > > --- > > drivers/thermal/of-thermal.c | 4 ++-- >

Re: [PATCH v1 03/10] cpufreq: Replace open-coded << with BIT()

2019-01-21 Thread Amit Kucheria
On Thu, Jan 17, 2019 at 4:26 AM Rafael J. Wysocki wrote: > > On Monday, January 14, 2019 5:34:55 PM CET Amit Kucheria wrote: > > Minor clean-up to use BIT() and keep checkpatch happy. Clean up the > > comment formatting while we're at it to make it easier to read. >

[PATCH] cpufreq: Replace open-coded << with BIT()

2019-01-21 Thread Amit Kucheria
Minor clean-up to use BIT() and keep checkpatch happy. Clean up the comment formatting while we're at it to make it easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- include/linux/cpufreq.h | 25 + 1 file changed, 13 insertions(+), 12 dele

Re: [PATCH v3 1/1] MAINTAINERS: update list of qcom drivers

2019-01-21 Thread Amit Kucheria
On Tue, Jan 15, 2019 at 1:16 AM Amit Kucheria wrote: > > Several drivers didn't have a specific maintainer (other than the > subsystem maintainer). Add some generic regex patterns to capture most > qcom drivers in the list of supported drivers. For the rest, add > explicit fil

[PATCH v3 1/1] MAINTAINERS: update list of qcom drivers

2019-01-14 Thread Amit Kucheria
Several drivers didn't have a specific maintainer (other than the subsystem maintainer). Add some generic regex patterns to capture most qcom drivers in the list of supported drivers. For the rest, add explicit filenames. Sort the entries, while we're at it. Signed-off-by: Ami

Re: [PATCH v2 0/9] Thermal throttling for SDM845

2019-01-14 Thread Amit Kucheria
On Mon, Jan 14, 2019 at 4:04 PM Amit Kucheria wrote: > > On Mon, Jan 14, 2019 at 3:57 PM Rafael J. Wysocki wrote: > > > > On Mon, Jan 14, 2019 at 11:22 AM Amit Kucheria > > wrote: > > > > > > Add support for thermal throttling on SDM845. > > &

[PATCH v1 09/10] cpufreq: scmi: Use auto-registration of thermal cooling device

2019-01-14 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/scmi-cpufreq.c | 14 ++ 1 file changed, 2

[PATCH v1 10/10] cpufreq: scpi: Use auto-registration of thermal cooling device

2019-01-14 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/scpi-cpufreq.c | 14 ++ 1 file changed, 2

[PATCH v1 08/10] cpufreq: qoriq: Use auto-registration of thermal cooling device

2019-01-14 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qoriq-cpufreq.c | 15 ++- 1 file changed, 2

[PATCH v1 07/10] cpufreq: mediatek: Use auto-registration of thermal cooling device

2019-01-14 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/mediatek-cpufreq.c | 14 ++ 1 file changed, 2

[PATCH v1 06/10] cpufreq: cpufreq-dt: Use auto-registration of thermal cooling device

2019-01-14 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq-dt.c | 14 ++ 1 file changed, 2 insertions

[PATCH v1 05/10] cpufreq: imx6q: Use auto-registration of thermal cooling device

2019-01-14 Thread Amit Kucheria
Use the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria --- drivers/cpufreq/imx6q-cpufreq.c | 18 ++ 1 file changed, 2

[PATCH v1 04/10] cpufreq: qcom-hw: Register as a cpufreq cooling device

2019-01-14 Thread Amit Kucheria
Add the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b

[PATCH v1 03/10] cpufreq: Replace open-coded << with BIT()

2019-01-14 Thread Amit Kucheria
Minor clean-up to use BIT() and keep checkpatch happy. Clean up the comment formatting while we're at it to make it easier to read. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/in

[PATCH v1 02/10] cpufreq: Add a flag to auto-register a cooling device

2019-01-14 Thread Amit Kucheria
: Viresh Kumar Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq.c | 17 + include/linux/cpufreq.h | 6 ++ 2 files changed, 23 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6f23ebb395f1..cd6e750d3d82 100644 --- a/drivers/cpufreq

[PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy

2019-01-14 Thread Amit Kucheria
-off-by: Amit Kucheria --- include/linux/cpufreq.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..7d0cf54125fa 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,11 @@ struct cpufreq_policy

[PATCH v1 00/10] cpufreq: Add flag to auto-register as cooling device

2019-01-14 Thread Amit Kucheria
: - Look at how to detect that we're not in IKS mode in arm_big_little's .ready callback. - The other pending issue is to fix allmodconfig that leaves us with CPU_FREQ=y and THERMAL=m (CPU_THERMAL=y). That leads to undefined references for functions defined in cpu_cooling.c Amit Ku

Re: [PATCH v2 0/9] Thermal throttling for SDM845

2019-01-14 Thread Amit Kucheria
On Mon, Jan 14, 2019 at 3:57 PM Rafael J. Wysocki wrote: > > On Mon, Jan 14, 2019 at 11:22 AM Amit Kucheria > wrote: > > > > Add support for thermal throttling on SDM845. > > > > We introduce a generic flag to be used by cpufreq drivers to tell the > >

[PATCH v2 3/9] drivers: cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy

2019-01-14 Thread Amit Kucheria
Several cpufreq drivers register themselves as thermal cooling devices. Adding a pointer to struct cpufreq_policy removes the need for them to store this pointer in a private data structure. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v2 6/9] cpufreq: qcom-hw: Register as a cpufreq cooling device

2019-01-14 Thread Amit Kucheria
Add the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b

[PATCH v2 0/9] Thermal throttling for SDM845

2019-01-14 Thread Amit Kucheria
converting other cpufreq drivers to use this flag and get rid of driver code. Amit Kucheria (9): [ALREADY QUEUED] cpufreq: qcom-hw: Move to device_initcall drivers: thermal: of-thermal: Print name of device node with error drivers: cpufreq: Add thermal_cooling_device pointer to struct

[PATCH v2 9/9] thermal: cpu_cooling: Clarify error message

2019-01-14 Thread Amit Kucheria
Make it clear that it is a failure if the cpufreq driver was unable to register as a cooling device. Makes it easier to find in logs and grepping for words like fail, err, warn. Signed-off-by: Amit Kucheria --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 7/9] arm64: dts: sdm845: Increase alert trip point to 95 degrees

2019-01-14 Thread Amit Kucheria
75 degrees is too aggressive for throttling the CPU. After speaking to Qualcomm engineers, increase it to 95 degrees. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts

[PATCH v2 4/9] cpufreq: Add a flag to auto-register a cooling device

2019-01-14 Thread Amit Kucheria
: Viresh Kumar Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq.c | 13 + include/linux/cpufreq.h | 6 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6f23ebb395f1..7faebfc61e60 100644 --- a/drivers/cpufreq

[PATCH v2 8/9] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-01-14 Thread Amit Kucheria
OPPs. At higher trip temperatures, allow ourselves to be throttled to any extent. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 177 --- 1 file changed, 161 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch

[PATCH v2 2/9] drivers: thermal: of-thermal: Print name of device node with error

2019-01-14 Thread Amit Kucheria
Make it easier to debug devicetree definition in case of errors. Signed-off-by: Amit Kucheria --- drivers/thermal/of-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 4bfdb4a1e47d..08c3ccbdacf8

[PATCH v2 5/9] cpufreq: Replace open-coded << with BIT()

2019-01-14 Thread Amit Kucheria
Minor clean-up to use BIT() and keep checkpatch happy. Clean-up the comment formatting to while we're at it to make it easier to read. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --

[PATCH v2 1/9] [ALREADY QUEUED] cpufreq: qcom-hw: Move to device_initcall

2019-01-14 Thread Amit Kucheria
k. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index d83939a1b3d4..64972749 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++

Re: [PATCH v2] arm64: dts: sdm845: Add cpufreq device node

2019-01-14 Thread Amit Kucheria
On Fri, Dec 21, 2018 at 11:44 PM Taniya Das wrote: > > This change adds the cpufreq node as per the bindings example for SDM845. > > Signed-off-by: Taniya Das > Tested-by: Matthias Kaehlcke Reviewed-by: Amit Kucheria Tested-by: Amit Kucheria > --- > arch/arm64/boot

Re: [PATCH v1 7/7] arm64: dts: sdm845: wireup the thermal trip points to cpufreq

2019-01-14 Thread Amit Kucheria
On Sat, Jan 12, 2019 at 2:06 AM Matthias Kaehlcke wrote: > > Another concern about adding trip points later could be the node > name. We currently have: > > > trips { > cpu0_alert0: trip0 { > ... > }; > > cpu0_crit: trip1 { > ... > }; > }; > > If we keep increasing enumeration with

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