Re: [PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-12-10 Thread Rajendra Nayak
> [].. > +Optional properties: +- qcom,sensor-id: List of sensor instances used in a given SoC. A TSENS IP can +have a fixed number of sensors (like 11) but a given SoC can +use only 5 of these and they might not always the first 5. They

Re: [PATCH v2] arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-12-01 Thread Rajendra Nayak
On 12/02/2015 02:59 AM, Bryan Huntsman wrote: > On 12/01/2015 08:11 AM, Rajendra Nayak wrote: >> Add new dtsi and dts files for the apq8096 dragonboards with just >> a serial device used as debug console >> >> While at it, also rearrange the Makefile so we

Re: [PATCH 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-12-01 Thread Rajendra Nayak
[].. >> >> return -ETIMEDOUT; >> >> } >> >> >> >> @@ -165,6 +169,7 @@ static int gdsc_init(struct gdsc *sc) >> >> { >> >> u32 mask, val; >> >> int on, ret; >> >> + unsigned int reg; >> >> >> >> /* >> >>* Disable HW trigger: collapse/restore occur based on registers >> writes. >> >>

[PATCH v2] arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-12-01 Thread Rajendra Nayak
Add new dtsi and dts files for the apq8096 dragonboards with just a serial device used as debug console While at it, also rearrange the Makefile so we have one dtb per line so as to be consistent with whats done on other platforms. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> ---

[PATCH v2 5/6] clk: qcom: gdsc: Add mmcc gdscs for msm8996 family

2015-12-01 Thread Rajendra Nayak
Add all gdsc data which are part of mmcc on msm8996 family Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 + drivers/clk/qcom/mmcc-msm8996.c | 157 ++ include/dt-bindings/clock/qcom,mmcc-m

[PATCH v2 6/6] clk: qcom: mmcc8974: Use gdscs .parent and remove genpd calls

2015-12-01 Thread Rajendra Nayak
With gdsc driver capable of handling hierarchical power domains, specify oxili_gdsc as parent of oxilicx_gdsc. Remove all direct calls to genpd from the mmcc clock driver. The adding and removing of subdomains is now handled from within the gdsc driver. Signed-off-by: Rajendra Nayak <

[PATCH v2 0/6] Add support for MSM8996 GDSCs

2015-12-01 Thread Rajendra Nayak
gdscs can be turned on/off successfully Rajendra Nayak (6): clk: qcom: gdsc: Add support for hierarchical power domains clk: qcom: gdsc: Add support for gdscs with gds hw controller clk: qcom: gdsc: Add support for votable gdscs clk: qcom: gdsc: Add GDSCs in msm8996 GCC clk: qcom: gdsc: Add

[PATCH v2 3/6] clk: qcom: gdsc: Add support for votable gdscs

2015-12-01 Thread Rajendra Nayak
at boot, if these GDSCs are found to be ON, we make sure we vote for them before we inform the genpd framework about their status. If genpd gets no users, it then disables (removes the vote) them as part of genpd_poweroff_unused() Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drive

[PATCH v2 1/6] clk: qcom: gdsc: Add support for hierarchical power domains

2015-12-01 Thread Rajendra Nayak
Some qcom SoCs' can have hierarchical power domains. Let the gdsc structs specify the parents (if any) and the driver add genpd subdomains for them. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/clk/qcom/common.c | 14 +- drivers/clk/qcom/gdsc.c

[PATCH v2 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-12-01 Thread Rajendra Nayak
ktime APIs instead for busy looping on status bits. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/clk/qcom/gdsc.c | 44 +++- drivers/clk/qcom/gdsc.h | 2 ++ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/drive

Re: [PATCH 5/6] clk: qcom: gdsc: Do not check for disabled status on votable gdscs

2015-11-30 Thread Rajendra Nayak
On 12/01/2015 07:23 AM, Stephen Boyd wrote: > On 11/26, Rajendra Nayak wrote: >> Some gdscs might be controlled via voting registers and might not >> really disable when the kernel intends to disable them (due to other >> votes keeping them enabled) >> Mark these

Re: arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-11-30 Thread Rajendra Nayak
On 12/01/2015 05:18 AM, Stephen Boyd wrote: > On 11/26, Rajendra Nayak wrote: >> Add new dtsi and dts files for the apq8096 dragonboards with just >> a serial device used as debug console >> >> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> >>

Re: [PATCH 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-11-30 Thread Rajendra Nayak
On 12/01/2015 07:52 AM, Stephen Boyd wrote: > On 11/26, Rajendra Nayak wrote: >> @@ -58,30 +58,34 @@ static int gdsc_toggle_logic(struct gdsc *sc, bool en) >> { >> int ret; >> u32 val = en ? 0 : SW_COLLAPSE_MASK; >> -u32 check = en ? PWR_ON_MASK :

Re: [PATCH v8 11/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-11-27 Thread Rajendra Nayak
Hi Stephen, >> +static int gdsc_attach(struct generic_pm_domain *domain, struct device >> *dev) >> +{ >> +int ret, i = 0, j = 0; >> +struct gdsc *sc = domain_to_gdsc(domain); >> +struct of_phandle_args clkspec; >> +struct device_node *np = dev->of_node; >> + >> +if

[PATCH 1/6] clk: qcom: gdsc: Add support for hierarchical power domains

2015-11-25 Thread Rajendra Nayak
Some qcom SoCs' can have hierarchical power domains. Let the gdsc structs specify the parents (if any) and the driver add genpd subdomains for them. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/clk/qcom/common.c | 14 +- drivers/clk/qcom/gdsc.c

[PATCH 4/6] clk: qcom: gdsc: Add mmcc gdscs for msm8996 family

2015-11-25 Thread Rajendra Nayak
Add all gdsc data which are part of mmcc on msm8996 family Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 + drivers/clk/qcom/mmcc-msm8996.c | 154 ++ include/dt-bindings/clock/qcom,mmcc-m

arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-11-25 Thread Rajendra Nayak
Add new dtsi and dts files for the apq8096 dragonboards with just a serial device used as debug console Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- Patch applies on top of Stephens' patches to add msm8996 dtsi https://lkml.org/lkml/2015/11/17/955 arch/arm64/boot/dts/qcom/Ma

[PATCH 6/6] clk: qcom: mmcc8974: Use gdscs .parent and remove genpd calls

2015-11-25 Thread Rajendra Nayak
With gdsc driver capable of handling hierarchical power domains, specify oxili_gdsc as parent of oxilicx_gdsc. Remove all direct calls to genpd from the mmcc clock driver. The adding and removing of subdomains is now handled from within the gdsc driver. Signed-off-by: Rajendra Nayak <

[PATCH 0/6] Add support for MSM8996 GDSCs

2015-11-25 Thread Rajendra Nayak
not yet add support for gpu gdscs which are part of mmcc. Tested on apq8096 dragonboards to make sure all modelled gdscs can be turned on/off successfully. [1] https://lkml.org/lkml/2015/11/17/949 Rajendra Nayak (6): clk: qcom: gdsc: Add support for hierarchical power domains clk: qcom: gdsc

[PATCH 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-11-25 Thread Rajendra Nayak
MMU operations or pending bus transactions before the power domain is turned off. In gdscs with gds_hw_controller block, its necessary to check the gds_hw_ctrl status bits instead of the ones in gdscr, to determine the state of the powerdomain. Signed-off-by: Rajendra Nayak <rna...@codeaurora.

[PATCH 3/6] clk: qcom: gdsc: Add GDSCs in msm8996 GCC

2015-11-25 Thread Rajendra Nayak
Add all data for the GDSCs which are part of msm8996 GCC block Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8996.dtsi| 1 + drivers/clk/qcom/gcc-msm8996.c | 88 include/dt-bindings/clock/qcom,gcc-m

[PATCH 5/6] clk: qcom: gdsc: Do not check for disabled status on votable gdscs

2015-11-25 Thread Rajendra Nayak
-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/clk/qcom/gcc-msm8996.c | 4 drivers/clk/qcom/gdsc.c | 4 drivers/clk/qcom/gdsc.h | 15 --- drivers/clk/qcom/mmcc-msm8996.c | 3 +++ 4 files changed, 19 insertions(+), 7 deletions(-) diff

Re: [PATCH 0/5] Add support for MSM8996 clock controllers

2015-11-17 Thread Rajendra Nayak
is still pending, mostly adding GDSCs and configuring the I have the GDSC support patches done on top. Will post once I get some reasonable testing done. > multimedia PLLs for FSM voting mode vs. manually enabling and > disabling them. So a v2 is probably going to come out after > some

Re: [PATCH v2 2/2] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-11-12 Thread Rajendra Nayak
On 11/13/2015 11:44 AM, Stephen Boyd wrote: > On 11/13, Rajendra Nayak wrote: >> >> On 10/07/2015 01:02 AM, Stephen Boyd wrote: >>> On 10/01, Stephen Boyd wrote: >>>> The oxili_cx GDSC is inside the power domain of the oxili GDSC. >>>> Add the dep

Re: [PATCH v2 2/2] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-11-12 Thread Rajendra Nayak
On 10/07/2015 01:02 AM, Stephen Boyd wrote: > On 10/01, Stephen Boyd wrote: >> The oxili_cx GDSC is inside the power domain of the oxili GDSC. >> Add the dependency so that the CX domain can properly power up. >> >> Reported-by: Rob Clark <robdcl...@gmail.c

Re: [PATCH v4 0/8] qcom: Add support for TSENS driver

2015-11-05 Thread Rajendra Nayak
On 11/03/2015 02:24 AM, Eduardo Valentin wrote: > On Fri, Oct 09, 2015 at 03:11:02PM +0530, Rajendra Nayak wrote: >> Patches 1/8 to 4/8 will need to go via the thermal tree/Eduardo. >> Patches 5/8 to 8/8 will need to go via qcom-msm tree/Andy. >> >> Eduardo,

Re: [PATCH v4 4/8] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-11-05 Thread Rajendra Nayak
On 11/03/2015 02:21 AM, Eduardo Valentin wrote: > On Fri, Oct 09, 2015 at 03:11:06PM +0530, Rajendra Nayak wrote: >> 8960 family of SoCs have the TSENS device as part of GCC, hence >> the driver probes the virtual child device created by GCC and >> uses the parent to extr

Re: [PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-11-04 Thread Rajendra Nayak
On 11/03/2015 02:00 AM, Eduardo Valentin wrote: > Hello Rajendra, > > On Fri, Oct 09, 2015 at 03:11:03PM +0530, Rajendra Nayak wrote: > > > >> +- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. >> +- Refer to Documentation/devicetree/bi

Re: [PATCH v4 0/8] qcom: Add support for TSENS driver

2015-11-04 Thread Rajendra Nayak
Hi Eduardo, On 11/03/2015 01:43 AM, Eduardo Valentin wrote: > Rajendra, > > On Fri, Oct 09, 2015 at 03:11:02PM +0530, Rajendra Nayak wrote: >> Patches 1/8 to 4/8 will need to go via the thermal tree/Eduardo. >> Patches 5/8 to 8/8 will need to go via qcom-msm tree/Andy. &

Re: [PATCH v4 2/8] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-11-04 Thread Rajendra Nayak
On 11/03/2015 02:12 AM, Eduardo Valentin wrote: > On Fri, Oct 09, 2015 at 03:11:04PM +0530, Rajendra Nayak wrote: >> Add support to calibrate sensors on 8916 family and also add common >> functions to read temperature from sensors (This can be reused on >> other SoCs having

[PATCH v4 5/8] arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-msm8974.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/b

[PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-10-09 Thread Rajendra Nayak
of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> Reviewed-by: Lina Iyer <lina.i...@linaro.org> --- .../devicet

[PATCH v4 7/8] arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-apq8084.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/b

[PATCH v4 4/8] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-10-09 Thread Rajendra Nayak
bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: Rajendra Nayak <rna...@codeaurora.

[PATCH v4 2/8] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-10-09 Thread Rajendra Nayak
Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 107 + drivers/thermal/qcom/tsens-common.c | 130 d

[PATCH v4 6/8] arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
TSENS is part of GCC, hence add TSENS properties as part of GCC node. Also add thermal zones and qfprom nodes. Update GCC bindings doc to mention the possibility of optional TSENS properties that can be part of GCC node. Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Naya

[PATCH v4 8/8] arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 66 +++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/b

[PATCH v4 3/8] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

2015-10-09 Thread Rajendra Nayak
Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c

[PATCH v4 0/8] qcom: Add support for TSENS driver

2015-10-09 Thread Rajendra Nayak
to change the authorship for any of the patches if needed. Rajendra Nayak (8): thermal: qcom: tsens: Add a skeletal TSENS drivers thermal: qcom: tsens-8916: Add support for 8916 family of SoCs thermal: qcom: tsens-8974: Add support for 8974 family of SoCs thermal: qcom: tsens-8960: Add support

Re: [PATCH v3 5/9] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-10-08 Thread Rajendra Nayak
On 10/08/2015 11:42 AM, Stephen Boyd wrote: > On 10/08, Rajendra Nayak wrote: >> diff --git a/drivers/thermal/qcom/Makefile b/drivers/thermal/qcom/Makefile >> index a471100..f3cefd1 100644 >> --- a/drivers/thermal/qcom/Makefile >> +++ b/drivers/thermal/qcom/Makefile

Re: [PATCH v3 4/9] clk: qcom: create virtual child device for TSENS

2015-10-08 Thread Rajendra Nayak
On 10/08/2015 11:35 AM, Stephen Boyd wrote: > On 10/08, Rajendra Nayak wrote: >> @@ -3520,11 +3522,26 @@ static int gcc_msm8960_probe(struct platform_device >> *pdev) >> if (IS_ERR(clk)) >> return PTR_ERR(clk); >> >> -return qcom_c

Re: [PATCH] clk: qcom: Drop calls to qcom_cc_remove()

2015-10-08 Thread Rajendra Nayak
On 10/08/2015 12:47 PM, Stephen Boyd wrote: > Now that qcom_cc_remove() is a nop, drop calls to > qcom_cc_remove() and any empty driver remove functions. > > Signed-off-by: Stephen Boyd > --- > > And here's the driver part. I left 8960_remove in place to make your patch >

[PATCH v3 7/9] arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
TSENS is part of GCC, hence add TSENS properties as part of GCC node. Also add thermal zones and qfprom nodes. Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-apq8064.dtsi | 101

Re: [PATCH v2 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-10-07 Thread Rajendra Nayak
On 09/21/2015 09:58 AM, Rajendra Nayak wrote: > [].. > >>> +static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) >>> +{ >>> +int degc, num, den; >>> + >>> +num = (adc_code * SLOPE_FACTOR) - s->offse

[PATCH v3 1/9] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-10-07 Thread Rajendra Nayak
of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> Reviewed-by: Lina Iyer <lina.i...@linaro.org> --- .../devicet

[PATCH v3 3/9] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

2015-10-07 Thread Rajendra Nayak
Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c

[PATCH v3 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-10-07 Thread Rajendra Nayak
Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 107 + drivers/thermal/qcom/tsens-common.c | 130 d

[PATCH v3 6/9] arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-msm8974.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/b

[PATCH v3 9/9] arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 66 +++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/b

[PATCH v3 0/9] qcom: Add support for TSENS driver

2015-10-07 Thread Rajendra Nayak
quite a bit in an effort to have a single driver for the various devices. I would be glad to change the authorship for any of the patches if needed. Rajendra Nayak (9): thermal: qcom: tsens: Add a skeletal TSENS drivers thermal: qcom: tsens-8916: Add support for 8916 family of SoCs thermal

[PATCH v3 8/9] arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross <agr...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-apq8084.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/b

Re: [PATCH] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-10-04 Thread Rajendra Nayak
[]... >>> It would also be nicer if this parent/child relationship can >>> somehow be represented in data (struct gdsc) that gets passed to >>> the gdsc driver which then sets it up, instead of individual >>> clock drivers doing it. >> >> Agreed. I'd rather that we do nothing besides register

Re: [PATCH] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-10-01 Thread Rajendra Nayak
On 09/24/2015 12:39 AM, Stephen Boyd wrote: The oxili_cx GDSC is inside the power domain of the oxili GDSC. Add the dependency so that the CX domain can properly power up. Reported-by: Rob Clark <robdcl...@gmail.com> Cc: Rajendra Nayak <rna...@codeaurora.org> Signed-off-by: Step

[PATCH] arm: dts: qcom: Add #power-domain-cells property

2015-10-01 Thread Rajendra Nayak
clock controller nodes which also support power domains (gdscs') need to have a #power-domain-cells property. Add these for gcc and mmcc nodes of msm8974, gcc of apq8084 and msm8916. Also update gcc and mmcc bindings for it. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- Andy, th

Re: [PATCH v2 1/9] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-09-20 Thread Rajendra Nayak
[].. +Example: +tsens: thermal-sensor@90 { + compatible = "qcom,msm8916-tsens"; + qcom,tsens-slopes = <1176 1176 1154 1176 + 1132 1132 1199 1132 1199 + 1132>; + nvmem-cells =

Re: [PATCH v2 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-09-20 Thread Rajendra Nayak
[].. +static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) +{ + int degc, num, den; + + num = (adc_code * SLOPE_FACTOR) - s->offset; + den = s->slope; + + if (num > 0) + degc = num + (den / 2); + else if (num < 0) +

Re: [PATCH v2 4/9] clk: qcom: create virtual child device for TSENS

2015-09-20 Thread Rajendra Nayak
On 09/17/2015 04:09 AM, Stephen Boyd wrote: On 09/16, Rajendra Nayak wrote: @@ -3520,7 +3522,26 @@ static int gcc_msm8960_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); - return qcom_cc_probe(pdev, match->data); +

[PATCH v2 6/9] arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes

2015-09-16 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-msm8974.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dt

[PATCH v2 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-09-16 Thread Rajendra Nayak
Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 107 + drivers/thermal/qcom/tsens-common.c | 130 d

[PATCH v2 4/9] clk: qcom: create virtual child device for TSENS

2015-09-16 Thread Rajendra Nayak
<sb...@codeaurora.org> Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/clk/qcom/gcc-msm8960.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index aa294b1..51

[PATCH v2 1/9] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-09-16 Thread Rajendra Nayak
of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> Reviewed-by: Lina Iyer <lina.i...@linaro.org> --- .../devicet

[PATCH v2 3/9] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

2015-09-16 Thread Rajendra Nayak
Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c

[PATCH v2 8/9] arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes

2015-09-16 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm/boot/dts/qcom-apq8084.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dt

[PATCH v2 5/9] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-09-16 Thread Rajendra Nayak
bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: Rajendra Nayak <rna...@codeaurora.

[PATCH v2 0/9] qcom: Add support for TSENS driver

2015-09-16 Thread Rajendra Nayak
be glad to change the authorship for any of the patches if needed. Rajendra Nayak (9): thermal: qcom: tsens: Add a skeletal TSENS drivers thermal: qcom: tsens-8916: Add support for 8916 family of SoCs thermal: qcom: tsens-8974: Add support for 8974 family of SoCs clk: qcom: create virtual

[PATCH v2 9/9] arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes

2015-09-16 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Signed-off-by: Rajendra Nayak <rna...@codeaurora.org> --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 66 +++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dt

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-08 Thread Rajendra Nayak
On 09/09/2015 12:51 AM, Stephen Boyd wrote: On 09/07, Rajendra Nayak wrote: Yeah this might happen though because we've assigned the of_node pointer to the tsens device before we register it on the platform bus. The other way to pass that data down from gcc to tsens would be to not have

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-08 Thread Rajendra Nayak
On 09/09/2015 09:03 AM, Rajendra Nayak wrote: On 09/09/2015 12:51 AM, Stephen Boyd wrote: On 09/07, Rajendra Nayak wrote: Yeah this might happen though because we've assigned the of_node pointer to the tsens device before we register it on the platform bus. The other way to pass that data

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-07 Thread Rajendra Nayak
[].. No. The driver should work just fine without having to interrogate the device's compatible string. If we still need the compatible check for some reason, then we can always match based on qcom,gcc-msm8960, qcom,gcc-apq8064, etc. But I don't see why Thats not quite possible I guess. 2

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-01 Thread Rajendra Nayak
Stephen, Also, I don't like having a subnode in DT. Why can't we use the same node as the GCC node and create a virtual child device here for tsens? We can assign the same of_node that this platform device has so that DT keeps working correctly. So the current driver looks up data based on

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-08-13 Thread Rajendra Nayak
[].. Also, I don't like having a subnode in DT. Why can't we use the same node as the GCC node and create a virtual child device here for tsens? We can assign the same of_node that this platform device has so that DT keeps working correctly. So the current driver looks up data based on

Re: [PATCH v8 11/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-08-12 Thread Rajendra Nayak
On 08/11/2015 12:22 PM, Stephen Boyd wrote: On 08/06, Rajendra Nayak wrote: + +static int gdsc_attach(struct generic_pm_domain *domain, struct device *dev) +{ + int ret, i = 0, j = 0; + struct gdsc *sc = domain_to_gdsc(domain); + struct of_phandle_args clkspec; + struct

Re: [PATCH v8 10/13] arm: dts: qcom: Add #power-domain-cells property

2015-08-12 Thread Rajendra Nayak
On 08/11/2015 12:23 PM, Stephen Boyd wrote: On 08/06, Rajendra Nayak wrote: msm8974 has gcc and mmcc nodes, and apq8084 has a gcc node which implement gdsc powerdomains. Add the #power-domain-cells property to them. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- This needs to go

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-08-12 Thread Rajendra Nayak
On 11/08/15 23:49, Stephen Boyd wrote: On 07/08, Rajendra Nayak wrote: diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index eb6a4f9..2c80d03 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -15,6 +15,7 @@ #include linux/bitops.h

[PATCH v8 12/13] clk: qcom: gdsc: Enable an RCG before turing on the gdsc

2015-08-06 Thread Rajendra Nayak
Some gdsc instances require a certain root clock (RCG) to be turned on *before* the power domain itself can be turned on. Handle this as part of the gdsc enable/disable callbacks. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gcc-msm8916.c | 1 + drivers/clk/qcom

[PATCH v8 11/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-08-06 Thread Rajendra Nayak
it. Use PM clocks to add support for this. A list of clock ids specified per gdsc would be the clocks turned on/off on every device start/stop callbacks. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gdsc.c | 58 + drivers

[PATCH v8 10/13] arm: dts: qcom: Add #power-domain-cells property

2015-08-06 Thread Rajendra Nayak
msm8974 has gcc and mmcc nodes, and apq8084 has a gcc node which implement gdsc powerdomains. Add the #power-domain-cells property to them. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- arch/arm/boot/dts/qcom-apq8084.dtsi | 1 + arch/arm/boot/dts/qcom-msm8974.dtsi | 2 ++ arch

[PATCH v8 03/13] clk: qcom: gdsc: Add support for Memory RET/OFF

2015-08-06 Thread Rajendra Nayak
one RET state where all memory is retained. Futher work, if needed can support multiple different levels of RET state. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gdsc.c | 33 + drivers/clk/qcom/gdsc.h | 13 + 2 files changed

[PATCH v8 09/13] clk: qcom: gdsc: Add GDSCs in apq8084 MMCC

2015-08-06 Thread Rajendra Nayak
From: Stephane Viau sv...@codeaurora.org Add the GDSC instances that exist as part of apq8084 MMCC block. Signed-off-by: Stephane Viau sv...@codeaurora.org Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/mmcc-apq8084

Re: [PATCH v7 12/13] clk: qcom: gdsc: Add GDSCs in apq8084 MMCC

2015-08-06 Thread Rajendra Nayak
On 07/31/2015 08:24 PM, Stanimir Varbanov wrote: snip +static struct gdsc venus0_gdsc = { + .gdscr = 0x1024, + .pd = { + .name = venus0, + }, + .pwrsts = PWRSTS_OFF_ON, + .con_ids = { NULL }, +}; + Rajendra, according to downstream kernel

[PATCH v8 01/13] clk: qcom: Add support for GDSCs

2015-08-06 Thread Rajendra Nayak
register space, its best to have the support added through the clock driver. Signed-off-by: Stephen Boyd sb...@codeaurora.org Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 4 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gdsc.c | 171

[PATCH v8 00/13] qcom: Add support for GDSCs

2015-08-06 Thread Rajendra Nayak
() in gdsc.c Rajendra Nayak (9): clk: qcom: gdsc: Prepare common clk probe to register gdscs clk: qcom: gdsc: Add support for Memory RET/OFF clk: qcom: gdsc: Add support for ON only state clk: qcom: gdsc: Add GDSCs in msm8916 GCC clk: qcom: gdsc: Add GDSCs in apq8084 GCC arm: dts: qcom

[PATCH v8 02/13] clk: qcom: gdsc: Prepare common clk probe to register gdscs

2015-08-06 Thread Rajendra Nayak
The common clk probe registers a clk provider and a reset controller. Update it to register a genpd provider using the gdsc data provided by each platform. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/common.c | 15 ++- drivers/clk/qcom/common.h | 2 ++ 2

[PATCH v8 05/13] clk: qcom: gdsc: Add GDSCs in msm8916 GCC

2015-08-06 Thread Rajendra Nayak
Add all data for the GDSCs which are part of msm8916 GCC block. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-msm8916.c | 51 include/dt-bindings/clock/qcom,gcc-msm8916

[PATCH v8 04/13] clk: qcom: gdsc: Add support for ON only state

2015-08-06 Thread Rajendra Nayak
every time the client driver would request the GDSC to be powered on/off instead. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/common.c | 3 ++- drivers/clk/qcom/gdsc.c | 35 ++- drivers/clk/qcom/gdsc.h | 11 ++- 3 files changed

Re: [PATCH v7 01/13] clk: qcom: Add support for GDSCs

2015-08-04 Thread Rajendra Nayak
[].. +int gdsc_register(struct device *dev, struct gdsc **scs, size_t num, + struct regmap *regmap) +{ + int i, ret; + struct genpd_onecell_data *data; + + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; +

Re: [PATCH v6 04/13] clk: qcom: gdsc: Manage clocks with !CONFIG_PM

2015-07-29 Thread Rajendra Nayak
On 07/29, Rajendra Nayak wrote: On 07/29/2015 06:34 AM, Stephen Boyd wrote: Sorry, I read the thread and I tried to understand what was going on but I'm still lost. Can you clarify further in the commit text somehow? So I can add this in the commit text, if it seems fine The use

Re: [PATCH v9 0/9] Add simple NVMEM Framework via regmap.

2015-07-29 Thread Rajendra Nayak
material, AFAIK there are more than 3 drivers depending on this framework which are wating since last 2 merge windows. I have been testing these with the qcom tsens driver, and did test v9 as well, so feel free to add my tested by for the entire series, Tested-by: Rajendra Nayak rna

[PATCH v7 09/13] clk: qcom: gdsc: Add GDSCs in msm8974 GCC

2015-07-28 Thread Rajendra Nayak
From: Stephen Boyd sb...@codeaurora.org There's just one GDSC as part of the msm8974 GCC block. Signed-off-by: Stephen Boyd sb...@codeaurora.org Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-msm8974.c

[PATCH v7 11/13] clk: qcom: gdsc: Add GDSCs in apq8084 GCC

2015-07-28 Thread Rajendra Nayak
Add the GDSC instances that exist as part of apq8084 GCC block Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-apq8084.c | 46 include/dt-bindings/clock/qcom,gcc-apq8084.h

[PATCH v7 12/13] clk: qcom: gdsc: Add GDSCs in apq8084 MMCC

2015-07-28 Thread Rajendra Nayak
From: Stephane Viau sv...@codeaurora.org Add the GDSC instances that exist as part of apq8084 MMCC block. Signed-off-by: Stephane Viau sv...@codeaurora.org Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/mmcc-apq8084

[PATCH v7 04/13] clk: qcom: gdsc: Manage clocks with !CONFIG_PM

2015-07-28 Thread Rajendra Nayak
With CONFIG_PM disabled, turn the devices clocks on during driver binding to the device, and turn them off when the driver is unbound from the device. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gdsc.c | 71 + 1 file

[PATCH v7 07/13] clk: qcom: gdsc: Add support for ON only state

2015-07-28 Thread Rajendra Nayak
every time the client driver would request the GDSC to be powered on/off instead. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/common.c | 3 ++- drivers/clk/qcom/gdsc.c | 35 ++- drivers/clk/qcom/gdsc.h | 11 ++- 3 files changed

[PATCH v7 06/13] clk: qcom: gdsc: Add support for Memory RET/OFF

2015-07-28 Thread Rajendra Nayak
one RET state where all memory is retained. Futher work, if needed can support multiple different levels of RET state. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gdsc.c | 33 + drivers/clk/qcom/gdsc.h | 13 + 2 files changed

[PATCH v7 03/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-07-28 Thread Rajendra Nayak
it. Use PM clocks to add support for this. A list of con_ids[] specified per gdsc would be the clocks turned on/off on every device start/stop callbacks. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gdsc.c | 42 ++ drivers/clk/qcom

[PATCH v7 00/13] qcom: Add support for GDSCs

2015-07-28 Thread Rajendra Nayak
gdsc_register() in gdsc.c Rajendra Nayak (9): clk: qcom: gdsc: Prepare common clk probe to register gdscs clk: qcom: gdsc: Use PM clocks to control gdsc clocks clk: qcom: gdsc: Manage clocks with !CONFIG_PM clk: qcom: gdsc: Enable an RCG before turing on the gdsc clk: qcom: gdsc: Add support

[PATCH v7 01/13] clk: qcom: Add support for GDSCs

2015-07-28 Thread Rajendra Nayak
register space, its best to have the support added through the clock driver. Signed-off-by: Stephen Boyd sb...@codeaurora.org Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 4 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gdsc.c | 171

[PATCH v7 02/13] clk: qcom: gdsc: Prepare common clk probe to register gdscs

2015-07-28 Thread Rajendra Nayak
The common clk probe registers a clk provider and a reset controller. Update it to register a genpd provider using the gdsc data provided by each platform. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/common.c | 15 ++- drivers/clk/qcom/common.h | 2 ++ 2

[PATCH v7 08/13] clk: qcom: gdsc: Add GDSCs in msm8916 GCC

2015-07-28 Thread Rajendra Nayak
Add all data for the GDSCs which are part of msm8916 GCC block. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-msm8916.c | 57 include/dt-bindings/clock/qcom,gcc-msm8916

[PATCH v7 05/13] clk: qcom: gdsc: Enable an RCG before turing on the gdsc

2015-07-28 Thread Rajendra Nayak
Some gdsc instances require a certain root clock (RCG) to be turned on *before* the power domain itself can be turned on. Handle this as part of the gdsc enable/disable callbacks. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/clk/qcom/gdsc.c | 20 +++- drivers

  1   2   3   >