Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337606 > unrolled thread

[PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2016-02-18 19:20 +0100
Last post2016-02-19 05:40 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-18 19:20 +0100
    [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-18 19:20 +0100
      Re: [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property  in DT binding Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-19 01:30 +0100
    [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu Javier Martinez Canillas <javier@osg.samsung.com> - 2016-02-18 19:30 +0100
      Re: [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for  vtmu Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-02-19 01:40 +0100
    Re: [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator  handling Andi Shyti <andi.shyti@samsung.com> - 2016-02-19 05:40 +0100

#1337606 — [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-02-18 19:20 +0100
Subject[PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling
Message-ID<r3Blf-16f-9@gated-at.bofh.it>
Hello,

On a recent patch series to build a PMIC chip as a module [0], Krzysztof
asked me to check if all the consumer drivers, using the resources that
this PMIC provides, already support probe deferral.

While investigating that, I noticed that the Exynos TMU didn't do it so
this series fix that bug and other two minor issues that I noticed while
reviewing the driver and its DT binding.

The series are on top of Krzysztof's patches [1,2,3] not because there's
a dependency but to avoid merge conflicts with in-flight patches. Please
let me know if you prefer to use a different base instead.

[0]: https://lkml.org/lkml/2016/2/11/857
[1]: https://patchwork.kernel.org/patch/8345791/
[2]: https://patchwork.kernel.org/patch/8345741/
[3]: https://patchwork.kernel.org/patch/8345701/

Best regards,
Javier


Javier Martinez Canillas (3):
  thermal: exynos: List vtmu-supply as optional property in DT binding
  thermal: exynos: Use devm_regulator_get_optional() for vtmu
  thermal: exynos: Defer probe if vtmu is present but not registered

 Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 9 ++++++---
 drivers/thermal/samsung/exynos_tmu.c                         | 4 +++-
 2 files changed, 9 insertions(+), 4 deletions(-)

-- 
2.5.0

[toc] | [next] | [standalone]


#1337609 — [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-02-18 19:20 +0100
Subject[PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding
Message-ID<r3Blg-16f-21@gated-at.bofh.it>
In reply to#1337606
The Exynos Thermal Management Unit binding says that the vtmu-supply
is optional but is listed in the required properties section. Add an
optional properties section and move the regulator property there.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
index faa62059b5c5..70b4c16c7ed8 100644
--- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
@@ -41,9 +41,6 @@
 		for current TMU channel
 	-- "tmu_sclk" clock for functional operation of the current TMU
 		channel
-- vtmu-supply: This entry is optional and provides the regulator node supplying
-		voltage to TMU. If needed this entry can be placed inside
-		board/platform specific dts file.
 
 The Exynos TMU supports generating interrupts when reaching given
 temperature thresholds. Number of supported thermal trip points depends
@@ -65,6 +62,12 @@ Following properties are mandatory (depending on SoC):
 - samsung,tmu_default_temp_offset: Default temperature offset
 - samsung,tmu_cal_type: Callibration type
 
+** Optional properties:
+
+- vtmu-supply: This entry is optional and provides the regulator node supplying
+		voltage to TMU. If needed this entry can be placed inside
+		board/platform specific dts file.
+
 Example 1):
 
 	tmu@100C0000 {
-- 
2.5.0

[toc] | [prev] | [next] | [standalone]


#1337804 — Re: [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2016-02-19 01:30 +0100
SubjectRe: [PATCH 1/3] thermal: exynos: List vtmu-supply as optional property in DT binding
Message-ID<r3H7k-5fY-5@gated-at.bofh.it>
In reply to#1337609
On 19.02.2016 03:19, Javier Martinez Canillas wrote:
> The Exynos Thermal Management Unit binding says that the vtmu-supply
> is optional but is listed in the required properties section. Add an
> optional properties section and move the regulator property there.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
> 
>  Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

[toc] | [prev] | [next] | [standalone]


#1337612 — [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-02-18 19:30 +0100
Subject[PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu
Message-ID<r3BuX-1bx-33@gated-at.bofh.it>
In reply to#1337606
The Exynos TMU DT binding says that the vtmu-supply is optional but the
driver uses devm_regulator_get() that creates a dummy regulator if it's
not defined in the DT. For example the following message is in the log:

10060000.tmu supply vtmu not found, using dummy regulator

Use the optional version of regulator_get() that doesn't create a dummy
regulator and instead returns a -ENODEV errno code. Since it's expected
that a regulator may not be defined and the driver will inform about it:

exynos-tmu 10060000.tmu: Regulator node (vtmu) not found

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/thermal/samsung/exynos_tmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 6c6f59ba7423..f4f36bba7be9 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1310,7 +1310,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
 	 * TODO: Add regulator as an SOC feature, so that regulator enable
 	 * is a compulsory call.
 	 */
-	data->regulator = devm_regulator_get(&pdev->dev, "vtmu");
+	data->regulator = devm_regulator_get_optional(&pdev->dev, "vtmu");
 	if (!IS_ERR(data->regulator)) {
 		ret = regulator_enable(data->regulator);
 		if (ret) {
-- 
2.5.0

[toc] | [prev] | [next] | [standalone]


#1337809 — Re: [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2016-02-19 01:40 +0100
SubjectRe: [PATCH 2/3] thermal: exynos: Use devm_regulator_get_optional() for vtmu
Message-ID<r3Hh0-5mf-13@gated-at.bofh.it>
In reply to#1337612
On 19.02.2016 03:19, Javier Martinez Canillas wrote:
> The Exynos TMU DT binding says that the vtmu-supply is optional but the
> driver uses devm_regulator_get() that creates a dummy regulator if it's
> not defined in the DT. For example the following message is in the log:
> 
> 10060000.tmu supply vtmu not found, using dummy regulator
> 
> Use the optional version of regulator_get() that doesn't create a dummy
> regulator and instead returns a -ENODEV errno code. Since it's expected
> that a regulator may not be defined and the driver will inform about it:
> 
> exynos-tmu 10060000.tmu: Regulator node (vtmu) not found
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
> 
>  drivers/thermal/samsung/exynos_tmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

[toc] | [prev] | [next] | [standalone]


#1337878 — Re: [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling

FromAndi Shyti <andi.shyti@samsung.com>
Date2016-02-19 05:40 +0100
SubjectRe: [PATCH 0/3] thermal: exynos: Fixes for vtmu-supply regulator handling
Message-ID<r3L1g-7XC-1@gated-at.bofh.it>
In reply to#1337606
Hi Javier,

> Javier Martinez Canillas (3):
>   thermal: exynos: List vtmu-supply as optional property in DT binding
>   thermal: exynos: Use devm_regulator_get_optional() for vtmu
>   thermal: exynos: Defer probe if vtmu is present but not registered
> 
>  Documentation/devicetree/bindings/thermal/exynos-thermal.txt | 9 ++++++---
>  drivers/thermal/samsung/exynos_tmu.c                         | 4 +++-
>  2 files changed, 9 insertions(+), 4 deletions(-)

for all of them:

Reviewed-by: Andi Shyti <andi.shyti@samsung.com>

Andi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web