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

2018-12-18 Thread Amit Kucheria
Several drivers didn't have a specific maintainer (other than the subsystem maintainer). Add all drivers referring to qcom or msm to the list of supported drivers. Signed-off-by: Amit Kucheria --- MAINTAINERS | 49 + 1 file changed, 45 inser

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

2018-12-18 Thread Amit Kucheria
On Tue, Dec 18, 2018 at 1:12 PM Kalle Valo wrote: > > Amit Kucheria writes: > > > Several drivers didn't have a specific maintainer (other than the > > subsystem maintainer). Switch to using the 'qcom' and 'msm' regex > > patterns to cap

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

2018-12-19 Thread Amit Kucheria
On Tue, Dec 18, 2018 at 6:02 PM Joe Perches wrote: > > On Tue, 2018-12-18 at 15:29 +0530, Amit Kucheria wrote: > > Several drivers didn't have a specific maintainer (other than the > > subsystem maintainer). Add all drivers referring to qcom or msm to the > &

Re: [PATCH v13 2/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver

2018-12-16 Thread Amit Kucheria
n > Signed-off-by: Stephen Boyd > Signed-off-by: Taniya Das Tested-by: Amit Kucheria > --- > drivers/cpufreq/Kconfig.arm | 11 ++ > drivers/cpufreq/Makefile | 1 + > drivers/cpufreq/qcom-cpufreq-hw.c | 308 > ++

Re: [PATCH v13 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ Firmware bindings

2018-12-16 Thread Amit Kucheria
On Fri, Dec 14, 2018 at 9:40 AM Taniya Das wrote: > > Add QCOM cpufreq firmware device bindings for Qualcomm Technology Inc's > SoCs. This is required for managing the cpu frequency transitions which are > controlled by the hardware engine. > > Signed-off-by: Taniya Das T

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

2018-12-17 Thread Amit Kucheria
re. Thanks to Marc for the idea to use the N regex. Signed-off-by: Amit Kucheria --- MAINTAINERS | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3318f30903b2..c9376030f77a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1929,20

Re: [GIT PULL] Qualcomm ARM64 DT updates for 4.20

2018-10-28 Thread Amit Kucheria
On Thu, Oct 25, 2018 at 9:38 PM Andy Gross wrote: > > On Thu, Oct 25, 2018 at 10:55:32AM +0530, Amit Kucheria wrote: > > > > > Andy, > > > > While you acked the tsens thermal DT patches[1] so they could go > > through the thermal tree[2] to avoid a depe

Re: [PATCH v2 7/7] arm64: dts: qcom: apq8016-sbc: Standardize LED labels

2018-10-29 Thread Amit Kucheria
ger: mmc1 (SD-card) > green:user4 default-trigger: none, panic-indicator > yellow:wlan default-trigger: phy0tx > blue:bt default-trigger: hci0-power > > So lets adopt the same for APQ8016 SBC (Dragonboard410c), which is > one of the 96Boards CE platform. You are missing a signed-o

Re: [PATCH v2 04/17] thermal: separate sensor registration and enable+check operations

2018-10-31 Thread Amit Kucheria
> --- a/drivers/hwmon/hwmon.c > +++ b/drivers/hwmon/hwmon.c > @@ -161,6 +161,11 @@ static int hwmon_thermal_add_sensor(struct device *dev, > if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV)) > return PTR_ERR(tzd); > > + if (!IS_ERR(tzd)) { > + thermal_zone_

[PATCH v1 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-10-15 Thread Amit Kucheria
qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++ 1 file changed, 206 insertions(+) diff --git

[PATCH v1 1/4] dt: thermal: tsens: Add bindings for qcs404

2018-10-15 Thread Amit Kucheria
qcs404 uses v1 of the TSENS IP block. Create a fallback DT property "qcom,tsens-v1" to gather common code. Signed-off-by: Amit Kucheria --- Documentation/devicetree/bindings/thermal/qcom-tsens.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindin

[PATCH v1 2/4] drivers: thermal: tsens: Add generic support for TSENS v1 IP

2018-10-15 Thread Amit Kucheria
qcs404 has a single TSENS IP block with 10 sensors. It uses version 1.4 of the TSENS IP, functionality for which is encapsulated inside qcom,tsens-v1 compatible. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-v1.c | 196

[PATCH v1 0/4] thermal: tsens: Add support for QCS404 platform

2018-10-15 Thread Amit Kucheria
le in this branch[1] for convenience). [1] https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=integration-linux-qcomlt Amit Kucheria (4): dt: thermal: tsens: Add bindings for qcs404 drivers: thermal: tsens: Add generic support for TSENS v1 IP arm64: dts: qcom: qcs404:

[PATCH v1 3/4] arm64: dts: qcom: qcs404: Add tsens controller

2018-10-15 Thread Amit Kucheria
qcs404 has a single TSENS IP block with 10 sensors. The calibration data is stored in an eeprom (qfprom) that is accessed through the nvmem framework. We add the qfprom node to allow the tsens sensors to be calibrated correctly. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404

Re: [GIT PULL] Qualcomm ARM64 DT updates for 4.20

2018-11-06 Thread Amit Kucheria
On Sun, Oct 28, 2018 at 11:24 PM Amit Kucheria wrote: > > On Thu, Oct 25, 2018 at 9:38 PM Andy Gross wrote: > > > > On Thu, Oct 25, 2018 at 10:55:32AM +0530, Amit Kucheria wrote: > > > > > > > > > Andy, > > > > > > While you acked

[PATCH v2 2/2] drivers: thermal: Move QCOM_SPMI_TEMP_ALARM into the qcom subdir

2018-10-04 Thread Amit Kucheria
: Amit Kucheria Acked-by: Daniel Lezcano --- drivers/thermal/Kconfig | 11 --- drivers/thermal/Makefile | 1 - drivers/thermal/qcom/Kconfig | 11 +++ drivers/thermal/qcom/Makefile | 1

[PATCH v2 0/2] driver: thermal: Move some drivers into subdirs

2018-10-04 Thread Amit Kucheria
ince v1: - Removed a stray character that snuck into the Makefile - Added Acks - Rebased to v4.19-rc6 Amit Kucheria (2): drivers: thermal: Move various drivers for intel platforms into a subdir drivers: thermal: Move QCOM_SPMI_TEMP_ALARM into the qcom subdir drivers/thermal/Kconfig

[PATCH v2 1/2] drivers: thermal: Move various drivers for intel platforms into a subdir

2018-10-04 Thread Amit Kucheria
This cleans up the directory a bit, now that we have several other platforms using platform-specific sub-directories. Compile-tested with ARCH=x86 defconfig and the drivers explicitly enabled with menuconfig. Signed-off-by: Amit Kucheria Acked-by: Daniel Lezcano --- drivers/thermal/Kconfig

Re: [PATCH 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ Firmware bindings

2018-10-23 Thread Amit Kucheria
Hi Taniya, Both the patches are missing v9 in their subject line - this threw off patchwork when trying to download the patches. On Thu, Oct 11, 2018 at 5:06 PM Taniya Das wrote: > > Add QCOM cpufreq firmware device bindings for Qualcomm Technology Inc's > SoCs. This is required for managing the

Re: [GIT PULL] Qualcomm ARM64 DT updates for 4.20

2018-10-24 Thread Amit Kucheria
On Fri, Oct 5, 2018 at 7:59 PM Andy Gross wrote: > > On Tue, Oct 02, 2018 at 11:30:29AM +0200, Arnd Bergmann wrote: > > On Sun, Sep 30, 2018 at 8:38 PM Andy Gross wrote: > > > > > > The following changes since commit > > > 5b394b2ddf0347bef56e50c69a58773c94343ff3: > > > > > > Linux 4.19-rc1 (2

Re: [PATCH v3 16/16] arm64: dts: sdm845: enable tsens thermal zones

2018-10-25 Thread Amit Kucheria
On Fri, Oct 26, 2018 at 12:55 AM Matthias Kaehlcke wrote: > > Hi Amit, > > vaguely related question, since you are working on SDM845 thermal > stuff: Do you have plans to add CPU cooling devices? I raised the > point during the review of the CPUfreq HW, however there was no > clear answer: https:/

Re: [PATCH v2 0/2] driver: thermal: Move some drivers into subdirs

2018-10-26 Thread Amit Kucheria
Hi Rui, On Thu, Oct 4, 2018 at 1:22 PM Amit Kucheria wrote: > > Move the various drivers for Intel platforms into their own subdir. Also > consolidate Qualcomm drivers into the qcom subdir. > > This cleans up the directory making it easier to find things. Any comments on these ch

Re: [PATCH v2 08/17] thermal: qcom: tsens: enable+check sensor after its setup is finished

2018-10-26 Thread Amit Kucheria
On Wed, Oct 17, 2018 at 9:24 PM Bartlomiej Zolnierkiewicz wrote: > > Enable+check sensor after setting tmdev->sensor[i].tzd and calling > chipset specific enable operation. > > Signed-off-by: Bartlomiej Zolnierkiewicz > --- > drivers/thermal/qcom/tsens.c | 6 +++--- > 1 file changed, 3 insertion

Re: [PATCH v2 03/17] thermal: separate sensor enable and check operations

2018-10-26 Thread Amit Kucheria
On Wed, Oct 17, 2018 at 9:23 PM Bartlomiej Zolnierkiewicz wrote: > > [devm]_thermal_zone_of_sensor_register() is used to register > thermal sensor by thermal drivers using DeviceTree. Besides > registering sensor this function also immediately: > > - enables it: > > tzd->ops->set_mode(tzd, THERM

Re: [PATCH v2 08/17] thermal: qcom: tsens: enable+check sensor after its setup is finished

2018-10-26 Thread Amit Kucheria
On Fri, Oct 26, 2018 at 5:41 PM Amit Kucheria wrote: > > On Wed, Oct 17, 2018 at 9:24 PM Bartlomiej Zolnierkiewicz > wrote: > > > > Enable+check sensor after setting tmdev->sensor[i].tzd and calling > > chipset specific enable operation. > > > >

Re: [PATCH v3 00/16] Another round of tsens cleanups

2018-09-18 Thread Amit Kucheria
Hi Eduardo, Andy, On Wed, Sep 12, 2018 at 2:53 AM Amit Kucheria wrote: > > This is another series of tsens cleanups before we add interrupt support. > This applies on top of 4.19-rc2. > > Patches [1-6] can directly be applied by Eduardo. > Patches [9-16] can directly

Re: [PATCH v7 2/7] thermal: tsens: Add support to split up register address space into two

2018-07-17 Thread Amit Kucheria
On Wed, Jul 18, 2018 at 4:59 AM Matthias Kaehlcke wrote: > > On Thu, Jul 12, 2018 at 02:09:03PM +0530, Amit Kucheria wrote: > > There are two banks of registers for v2 TSENS IPs: SROT and TM. On older > > SoCs these were contiguous, leading to DTs mapping them as one register &g

[PATCH v8 0/7] thermal: tsens: Refactoring for TSENSv2 IP

2018-07-17 Thread Amit Kucheria
river on sdm845, now that 4.18-rc1 will contain an sdm845.dtsi Changes since v1: - Move get_temp() from tsens-8996 to tsens-common and rename - Change 8996 DT entry to allow init_common() to work across sdm845 and 8996 due to different offsets Amit Kucheria (7): thermal: tsens: Get rid of u

Re: [PATCH v7 5/7] dt: thermal: tsens: Document the fallback DT property for v2 of TSENS IP

2018-07-17 Thread Amit Kucheria
On Wed, Jul 18, 2018 at 5:39 AM, Matthias Kaehlcke wrote: > On Thu, Jul 12, 2018 at 02:09:06PM +0530, Amit Kucheria wrote: >> We want to create common code for v2 of the TSENS IP block that is used in >> a large number of Qualcomm SoCs. "qcom,tsens-v2" should be able

[PATCH v8 1/7] thermal: tsens: Get rid of unused fields in structure

2018-07-17 Thread Amit Kucheria
status_field and trdy are unused in any of the tsens drivers. Remove them. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Acked-by: Rajendra Nayak Tested-by: Matthias Kaehlcke --- drivers/thermal/qcom/tsens.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/thermal

[PATCH v8 4/7] arm64: dts: msm8996: thermal: Initialise via DT and add second controller

2018-07-17 Thread Amit Kucheria
() currently only registers one address space, the order is important (TM before SROT). This is OK since the code doesn't really use the SROT functionality yet. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Review

[PATCH v8 2/7] dt: thermal: tsens: Document the fallback DT property for v2 of TSENS IP

2018-07-17 Thread Amit Kucheria
M and SROT register banks because their offsets are not constant across SoC families. Signed-off-by: Amit Kucheria Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- .../devicetree/bindings/th

[PATCH v8 3/7] thermal: tsens: Add support to split up register address space into two

2018-07-17 Thread Amit Kucheria
DTs and adjust associated offsets for the TM register bank so that the old DTs will continue to function correctly. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- drivers/thermal/qcom

[PATCH v8 6/7] thermal: tsens: Add generic support for TSENS v2 IP

2018-07-17 Thread Amit Kucheria
SDM845 uses v2 of the TSENS IP block but the get_temp() function appears to be identical across v2.x.y in code seen so far. We use the generic get_temp() function defined as part of ops_generic_v2. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed

[PATCH v8 7/7] arm64: dts: sdm845: Add tsens nodes

2018-07-17 Thread Amit Kucheria
SDM845 has two tsens blocks, one with 13 sensors and the other with 8 sensors. It uses version 2 of the TSENS IP, so use the fallback property to allow more common code. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke

[PATCH v8 5/7] thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse

2018-07-17 Thread Amit Kucheria
The TSENS block inside the 8996 is internally classified as version 2 of the IP. Several other SoC families use this block and can share this code. We rename get_temp() to reflect that it can be used across the v2 family. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by

[PATCH v1 0/3] thermal: tsens: bugfixes, cleanups

2018-07-18 Thread Amit Kucheria
Amit Kucheria (3): thermal: tsens: Rename variable thermal: tsens: switch from of_iomap() to devm_ioremap_resource() thermal: tsens: Fix negative temperature reporting drivers/thermal/qcom/tsens-common.c | 19 ++- drivers/thermal/qcom/tsens-v2.c | 23

[PATCH v1 1/3] thermal: tsens: Rename variable

2018-07-18 Thread Amit Kucheria
We're actually reading the temperature from the status register. Fix the variable name to reflect that. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 6 +++--- drivers/thermal/qcom/tsens-v2.c | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-)

[PATCH v1 2/3] thermal: tsens: switch from of_iomap() to devm_ioremap_resource()

2018-07-18 Thread Amit Kucheria
devm_ioremap_resources() automatically requests resources (so that the I/O region shows up in /proc/iomem) and devm_ wrappers do better error handling and unmapping of the I/O region when needed. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 13 +++-- 1 file

[PATCH v1 3/3] thermal: tsens: Fix negative temperature reporting

2018-07-18 Thread Amit Kucheria
The current code will always return 0x in case of negative temperatures due to a bug in how the binary sign extension is being done. Use sign_extend32() instead. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-v2.c | 13 + 1 file changed, 5 insertions(+), 8

[PATCH v1] arm64: dts: sdm845: enable tsens thermal zones

2018-07-18 Thread Amit Kucheria
One thermal zone per cpu is defined Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 170 +++ 1 file changed, 170 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 01ff146

Re: [PATCH] cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER

2018-07-18 Thread Amit Kucheria
On Wed, Jul 18, 2018 at 2:18 AM, Niklas Cassel wrote: > If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an > error message. Just be silent in this case. > > Signed-off-by: Niklas Cassel Reviewed-by: Amit Kucheria > --- > drivers/cpufreq/

Re: [PATCH 14/15] arm: dts: qcom: Add missing OPP properties for CPUs

2018-07-18 Thread Amit Kucheria
property (clock latency) as well to make it all > work. > > Signed-off-by: Viresh Kumar FWIW, Reviewed-by: Amit Kucheria > --- > arch/arm/boot/dts/qcom-ipq4019.dtsi | 24 > 1 file changed, 24 insertions(+) > > diff --git a/arch/arm/boot/dts

Re: ARM64: hibernation: How to use hibernation/suspend-to-disk on ARMv8?

2015-01-11 Thread Amit Kucheria
(Fixing Sebastian's email address) On Sat, Jan 10, 2015 at 8:44 PM, George Bush wrote: > Hi all > > I notice we have hibernation.c in arm/kernel, however, I don't find it in > arm64. > Does it mean arm64 do not support hibernation/suspend-to-disk function? Correct. arm64 is a separate architect

Re: [PATCH v3] ARM: dts: mt8173: support arm64 cpuidle-dt

2015-06-02 Thread Amit Kucheria
On Tue, Jun 2, 2015 at 12:47 PM, Howard Chen wrote: >> what changed in the interim ? v1->v2 the cluster idle state disappeared, > > The cluster idle won't be available in the near future and possibly never > will, > while the C1 state is ready and stable, so I split the C1 part out. May I ask w

Re: [PATCH v14 0/2] Kryo CPU scaling driver

2018-05-29 Thread Amit Kucheria
| 1 + > drivers/cpufreq/cpufreq-dt-platdev.c | 3 + > drivers/cpufreq/qcom-cpufreq-kryo.c| 206 +++ > 6 files changed, 907 insertions(+) > create mode 100644 Documentation/devicetree/bindings/opp/kryo-cpufreq.txt > create mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c > FWIW, Reviewed-by: Amit Kucheria Tested-by: Amit Kucheria

Re: [PATCH] thermal: qcom: tsens: Allow number of sensors to come from DT

2018-05-14 Thread Amit Kucheria
ise, Reviewed-by: Amit Kucheria > --- > .../devicetree/bindings/thermal/qcom-tsens.txt | 1 + > drivers/thermal/qcom/tsens.c | 12 +--- > 2 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/b

Re: [PATCH v7 00/14] CPU scaling support for msm8996

2018-05-16 Thread Amit Kucheria
On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > [v7] > * Addressed comments from Viresh about resourses deallocation >and DT compatible Hi Ilia, Thanks for working on this series. Here a few comments regarding the series as a whole. - The series could use a better cover letter describi

Re: [PATCH v7 01/14] soc: qcom: Separate kryo l2 accessors from PMU driver

2018-05-16 Thread Amit Kucheria
On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > The driver provides kernel level API for other drivers > to access the MSM8996 L2 cache registers. > Separating the L2 access code from the PMU driver and > making it public to allow other drivers use it. > The accesses must be separated with a s

Re: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver

2018-05-16 Thread Amit Kucheria
On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO processors, > the CPU ferequencies subset and voltage value of each OPP varies s/ferequencies/frequency > based on the silicon variant in use. Qualcomm Process Voltage Scaling Tables

Re: [PATCH v7 10/14] dt-bindings: qcom_spmi: Add support for SAW documentation

2018-05-16 Thread Amit Kucheria
On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > Add support for SAW controlled regulators. > The regulators defined as SAW controlled in the device tree > will be controlled through special CPU registers instead of direct > SPMI accesses. > This is required especially for CPU supply regulators

Re: [PATCH v7 03/14] clk: qcom: Add CPU clock driver for msm8996

2018-05-16 Thread Amit Kucheria
On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > Each of the CPU clusters (Power and Perf) on msm8996 are > clocked via 2 PLLs, a primary and alternate. There are also > 2 Mux'es, a primary and secondary all connected together > as shown below > > +---+ >

Re: [PATCH v7 14/14] dt: qcom: Add qcom-cpufreq-kryo driver configuration

2018-05-16 Thread Amit Kucheria
2018-05-15 12:13 GMT+03:00 Ilia Lin : No commit message? Perhaps something listing the different hw types? > Signed-off-by: Ilia Lin > --- > arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 +- > arch/arm64/boot/dts/qcom/msm8996.dtsi | 311 > +++- > 2 files chan

Re: [PATCH v7 13/14] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-16 Thread Amit Kucheria
On Tue, May 15, 2018 at 12:13 PM, Ilia Lin wrote: > In Certain Qualcomm Technologies, Inc. SoCs like apq8096 and msm8996 > that have KRYO processors, the CPU ferequencies subset and voltage value s/ferequencies/frequency > of each OPP varies based on the silicon variant in use. > Qualcomm Techno

Re: [PATCH v7 12/14] cpufreq: Add Kryo CPU scaling driver

2018-05-16 Thread Amit Kucheria
On Wed, May 16, 2018 at 5:11 PM, Viresh Kumar wrote: > On 16-05-18, 16:12, Amit Kucheria wrote: >> > + ret = PTR_ERR_OR_ZERO(opp_temp = >> > + >> > dev_pm_opp_set_supported_hw(cpu_dev,&versions,1)); >> > + if (0 &

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

2019-02-28 Thread Amit Kucheria
f get_temp_common in favour of get_temp_tsens_valid b. irq support c. Convert over 8960 to use regmap_field and as a result common functions Amit Kucheria (24): drivers: thermal: tsens: Document the data structures drivers: thermal: tsens: Rename tsens_data drivers: thermal: tsens: Rename tsens_de

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

2019-02-28 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 v2 01/24] drivers: thermal: tsens: Document the data structures

2019-02-28 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 v2 07/24] drivers: thermal: tsens: Rename tsens-8916 to prepare to merge with tsens-8974

2019-02-28 Thread Amit Kucheria
8916 and 8974 use v0.1.0 of the TSENS IP. Rename tsens-8916 to prepare it for merging with tsens-8974 in a later commit. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/{tsens-8916.c => tsens-v0_1.c} | 0 2 files changed

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

2019-02-28 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 v2 05/24] drivers: thermal: tsens: Use consistent names for variables

2019-02-28 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 v2 03/24] drivers: thermal: tsens: Rename tsens_device

2019-02-28 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 v2 06/24] drivers: thermal: tsens: Function prototypes should have argument names

2019-02-28 Thread Amit Kucheria
check_patch complains a lot as follows: WARNING: function definition argument 'struct tsens_priv *' should also have an identifier name + int (*init)(struct tsens_priv *); Fix it. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.h | 24 --

[PATCH v2 08/24] drivers: thermal: tsens: Rename constants to prepare to merge with tsens-8974

2019-02-28 Thread Amit Kucheria
Some #defines in tsens-v_0_1.c clash with those in tsens-8974.c. Prefix them with 8916 to avoid the clash so we can merge the two files. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-v0_1.c | 88 +++ 1 file changed, 44 insertions(+), 44 deletions

[PATCH v2 09/24] drivers: thermal: tsens: Merge tsens-8974 into tsens-v0_1

2019-02-28 Thread Amit Kucheria
8974 and 8916 have the same version of the TSENS IP. Merge the files to allow for better code reuse. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c | 236 -- drivers/thermal/qcom/tsens-v0_1.c | 229

[PATCH v2 11/24] drivers: thermal: tsens: Save reference to the device pointer and use it

2019-02-28 Thread Amit Kucheria
Code cleanup making it easier to read Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index a82e4c928a78

[PATCH v2 10/24] drivers: thermal: tsens: Introduce reg_fields to deal with register description

2019-02-28 Thread Amit Kucheria
et of registers and bit-fields that we care about across the various tsens IP versions. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 59 --- drivers/thermal/qcom/tsens-v0_1.c | 42 - drivers/thermal/qcom/tsens-v2.c | 118 ++--- drivers/thermal/qcom/ts

[PATCH v2 12/24] drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER

2019-02-28 Thread Amit Kucheria
people when, in fact, calibration succeeds later when nvmem/qfprom device is available. Don't print this message on a -EPROBE_DEFER. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/tsen

[PATCH v2 13/24] drivers: thermal: tsens: Track IP version

2019-02-28 Thread Amit Kucheria
Version information is available on some TSENS IP. Allow reading it by allocating memory for the regmap_field. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers

[PATCH v2 14/24] drivers: thermal: tsens: Add new operation to check if a sensor is enabled

2019-02-28 Thread Amit Kucheria
is_sensor_enabled() checks if the sensors are enabled on this platform. It is possible that the SoC might choose not to enable all the sensors that the IP block is capable of supporting. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 14 ++ drivers/thermal

[PATCH v2 15/24] drivers: thermal: tsens: change data type for sensor IDs

2019-02-28 Thread Amit Kucheria
The IDs cannot be negative, fix the data type. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 023fed3352e3..a20725b1cc67 100644 --- a/drivers

[PATCH v2 22/24] arm64: dts: qcom: qcs404: Add tsens controller

2019-02-28 Thread Amit Kucheria
qcs404 has a single TSENS IP block with 10 sensors. The calibration data is stored in an eeprom (qfprom) that is accessed through the nvmem framework. We add the qfprom node to allow the tsens sensors to be calibrated correctly. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404

[PATCH v2 20/24] dt: thermal: tsens: Add bindings for qcs404

2019-02-28 Thread Amit Kucheria
qcs404 uses v1 of the TSENS IP block. Create a fallback DT property "qcom,tsens-v1" to gather common code Signed-off-by: Amit Kucheria Reviewed-by: Rob Herring --- .../devicetree/bindings/thermal/qcom-tsens.txt | 14 ++ 1 file changed, 14 insertions(+) di

[PATCH v2 17/24] drivers: thermal: tsens: simplify get_temp_tsens_v2 routine

2019-02-28 Thread Amit Kucheria
The current implementation is based on an algorithm published in the docs. Instead of reading the temperature thrice w/o any explanation, improve the algorithm. This will become the basis for a common get_temp routine in the future. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens

[PATCH v2 18/24] drivers: thermal: tsens: Move get_temp_tsens_v2 to allow sharing

2019-02-28 Thread Amit Kucheria
Just rename the function and move it to allow code sharing with future versions of TSENS IP Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 35 +++ drivers/thermal/qcom/tsens-v2.c | 37 + drivers/thermal/qcom/tsens.h

[PATCH v2 19/24] drivers: thermal: tsens: Common get_temp() learns to do ADC conversion

2019-02-28 Thread Amit Kucheria
get_temp() learns to return temperature regardless of whether it is returned as ADC code or direct temperature. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/qcom/tsens

[PATCH v2 21/24] drivers: thermal: tsens: Add generic support for TSENS v1 IP

2019-02-28 Thread Amit Kucheria
qcs404 has a single TSENS IP block with 10 sensors. It uses version 1.4 of the TSENS IP, functionality for which is encapsulated inside the qcom,tsens-v1 compatible. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/Makefile | 4 +- drivers/thermal/qcom/tsens-v1.c | 194

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

2019-02-28 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 v2 23/24] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2019-02-28 Thread Amit Kucheria
qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 252 +++ 1 file changed, 252 insertions(+) diff --git

[PATCH v2 24/24] drivers: thermal: tsens: Move calibration constants to header file

2019-02-28 Thread Amit Kucheria
This will allow calibration routines to correctly include the constants from anywhere and allow more code sharing. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-common.c | 5 - drivers/thermal/qcom/tsens.h| 5 + 2 files changed, 5 insertions(+), 5 deletions

Re: [PATCH 1/7] thermal/drivers/core: Remove the module Kconfig's option

2019-04-23 Thread Amit Kucheria
On Tue, Apr 23, 2019 at 9:22 PM Eduardo Valentin wrote: > > Hello, > > On Tue, Apr 02, 2019 at 06:12:44PM +0200, Daniel Lezcano wrote: > > The module support for the thermal subsystem makes little sense: > > - some subsystems relying on it are not modules, thus forcing the > >framework to be

Re: [PATCH v2 00/13] qcom: dts: thermal cleanups

2019-04-24 Thread Amit Kucheria
hermal_zone18/type > battery-thermal This look wrong. TSENS shouldn't have board-specific thermal zones. > /sys/class/thermal/thermal_zone19/k_d > 0 > /sys/class/thermal/thermal_zone19/sustainable_power > 0 > /sys/class/thermal/thermal_zone19/type > skin-thermal And t

Re: [PATCH v2 00/13] qcom: dts: thermal cleanups

2019-04-25 Thread Amit Kucheria
On Thu, Apr 25, 2019 at 6:36 PM Marc Gonzalez wrote: > > On 25/04/2019 08:31, Amit Kucheria wrote: > > > [PATCH 3/3] arm64: dts: msm8998: thermal: Restrict thermal zone name length > > to under 20 > > > > The thermal core restricts names of thermal zones to under

[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

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

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: [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

[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

[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 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 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 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 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 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 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

Re: [PATCH v2 00/13] qcom: dts: thermal cleanups

2019-04-02 Thread Amit Kucheria
On Tue, Apr 2, 2019 at 8:58 PM Marc Gonzalez wrote: > > On 29/03/2019 11:12, Amit Kucheria wrote: > > > Changes since v1: > > - Devices that are not associated with cooling-maps use the 'hot' type > > - Remove critical trip from such devices too and restrict

Re: [PATCH 5/7] thermal/drivers/core: Remove depends on THERMAL in Kconfig

2019-04-02 Thread Amit Kucheria
On Tue, Apr 2, 2019 at 11:14 PM Daniel Lezcano wrote: > > The dependency on the THERMAL option to be set is already there implicitly > by the "if THERMAL" conditionnal option. The sub Kconfigs do not have to > check against the THERMAL option as they are called from a Kconfig block > which is enab

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