* [PATCH 2/2] Thermal: exynos: Add compatible string for exynos4412
2013-04-18 11:37 [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs Sachin Kamat
@ 2013-04-18 11:37 ` Sachin Kamat
2013-04-22 18:27 ` Eduardo Valentin
2013-04-22 18:14 ` [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs Sachin Kamat
2013-04-22 18:25 ` Eduardo Valentin
2 siblings, 1 reply; 7+ messages in thread
From: Sachin Kamat @ 2013-04-18 11:37 UTC (permalink / raw)
To: linux-pm
Cc: rui.zhang, eduardo.valentin, sachin.kamat, kgene.kim, patches,
Amit Daniel Kachhap
Added compatible string for Exynos4412 SoC.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
---
drivers/thermal/exynos_thermal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index 9df96e5..d20ce9e 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -855,6 +855,10 @@ static const struct of_device_id exynos_tmu_match[] = {
.data = (void *)EXYNOS4210_TMU_DRV_DATA,
},
{
+ .compatible = "samsung,exynos4412-tmu",
+ .data = (void *)EXYNOS_TMU_DRV_DATA,
+ },
+ {
.compatible = "samsung,exynos5250-tmu",
.data = (void *)EXYNOS_TMU_DRV_DATA,
},
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] Thermal: exynos: Add compatible string for exynos4412
2013-04-18 11:37 ` [PATCH 2/2] Thermal: exynos: Add compatible string for exynos4412 Sachin Kamat
@ 2013-04-22 18:27 ` Eduardo Valentin
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Valentin @ 2013-04-22 18:27 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-pm, rui.zhang, eduardo.valentin, kgene.kim, patches,
Amit Daniel Kachhap
Rui,
On 18-04-2013 07:37, Sachin Kamat wrote:
> Added compatible string for Exynos4412 SoC.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
Please add my acked for this patch:
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
> drivers/thermal/exynos_thermal.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
> index 9df96e5..d20ce9e 100644
> --- a/drivers/thermal/exynos_thermal.c
> +++ b/drivers/thermal/exynos_thermal.c
> @@ -855,6 +855,10 @@ static const struct of_device_id exynos_tmu_match[] = {
> .data = (void *)EXYNOS4210_TMU_DRV_DATA,
> },
> {
> + .compatible = "samsung,exynos4412-tmu",
> + .data = (void *)EXYNOS_TMU_DRV_DATA,
> + },
> + {
> .compatible = "samsung,exynos5250-tmu",
> .data = (void *)EXYNOS_TMU_DRV_DATA,
> },
>
Please send a patch to include the documentation for this too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs
2013-04-18 11:37 [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs Sachin Kamat
2013-04-18 11:37 ` [PATCH 2/2] Thermal: exynos: Add compatible string for exynos4412 Sachin Kamat
@ 2013-04-22 18:14 ` Sachin Kamat
2013-04-22 18:25 ` Eduardo Valentin
2 siblings, 0 replies; 7+ messages in thread
From: Sachin Kamat @ 2013-04-22 18:14 UTC (permalink / raw)
To: linux-pm
Cc: rui.zhang, eduardo.valentin, sachin.kamat, kgene.kim, patches,
Amit Daniel Kachhap
Hi Eduardo,
Any comments on this series? If possible would like to have this in
3.10 itself as without this TMU support would be broken on exynos
machines due to migration to common clock framework.
On 18 April 2013 17:07, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> clk_{un}prepare APIs are required to migrate to common
> clock framework. While at it convert to use devm_clk_get as
> it removes some cleanup code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
> ---
> drivers/thermal/exynos_thermal.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
> index e34d842..9df96e5 100644
> --- a/drivers/thermal/exynos_thermal.c
> +++ b/drivers/thermal/exynos_thermal.c
> @@ -937,12 +937,16 @@ static int exynos_tmu_probe(struct platform_device *pdev)
> return ret;
> }
>
> - data->clk = clk_get(NULL, "tmu_apbif");
> + data->clk = devm_clk_get(&pdev->dev, "tmu_apbif");
> if (IS_ERR(data->clk)) {
> dev_err(&pdev->dev, "Failed to get clock\n");
> return PTR_ERR(data->clk);
> }
>
> + ret = clk_prepare(data->clk);
> + if (ret)
> + return ret;
> +
> if (pdata->type == SOC_ARCH_EXYNOS ||
> pdata->type == SOC_ARCH_EXYNOS4210)
> data->soc = pdata->type;
> @@ -994,7 +998,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
> return 0;
> err_clk:
> platform_set_drvdata(pdev, NULL);
> - clk_put(data->clk);
> + clk_unprepare(data->clk);
> return ret;
> }
>
> @@ -1006,7 +1010,7 @@ static int exynos_tmu_remove(struct platform_device *pdev)
>
> exynos_unregister_thermal();
>
> - clk_put(data->clk);
> + clk_unprepare(data->clk);
>
> platform_set_drvdata(pdev, NULL);
>
> --
> 1.7.9.5
>
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs
2013-04-18 11:37 [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs Sachin Kamat
2013-04-18 11:37 ` [PATCH 2/2] Thermal: exynos: Add compatible string for exynos4412 Sachin Kamat
2013-04-22 18:14 ` [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs Sachin Kamat
@ 2013-04-22 18:25 ` Eduardo Valentin
2013-04-23 3:38 ` Sachin Kamat
2 siblings, 1 reply; 7+ messages in thread
From: Eduardo Valentin @ 2013-04-22 18:25 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-pm, rui.zhang, eduardo.valentin, kgene.kim, patches,
Amit Daniel Kachhap
On 18-04-2013 07:37, Sachin Kamat wrote:
> clk_{un}prepare APIs are required to migrate to common
> clock framework. While at it convert to use devm_clk_get as
> it removes some cleanup code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
> ---
> drivers/thermal/exynos_thermal.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
> index e34d842..9df96e5 100644
> --- a/drivers/thermal/exynos_thermal.c
> +++ b/drivers/thermal/exynos_thermal.c
> @@ -937,12 +937,16 @@ static int exynos_tmu_probe(struct platform_device *pdev)
> return ret;
> }
>
> - data->clk = clk_get(NULL, "tmu_apbif");
> + data->clk = devm_clk_get(&pdev->dev, "tmu_apbif");
Here you are also changing the sequence from clk_get(NULL, ...) to
clk_get(&pdev->dev, ...). Is your platform code ready to match to your
device node?
> if (IS_ERR(data->clk)) {
> dev_err(&pdev->dev, "Failed to get clock\n");
> return PTR_ERR(data->clk);
> }
>
> + ret = clk_prepare(data->clk);
> + if (ret)
> + return ret;
> +
> if (pdata->type == SOC_ARCH_EXYNOS ||
> pdata->type == SOC_ARCH_EXYNOS4210)
> data->soc = pdata->type;
> @@ -994,7 +998,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
> return 0;
> err_clk:
> platform_set_drvdata(pdev, NULL);
> - clk_put(data->clk);
> + clk_unprepare(data->clk);
> return ret;
> }
>
> @@ -1006,7 +1010,7 @@ static int exynos_tmu_remove(struct platform_device *pdev)
>
> exynos_unregister_thermal();
>
> - clk_put(data->clk);
> + clk_unprepare(data->clk);
>
> platform_set_drvdata(pdev, NULL);
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs
2013-04-22 18:25 ` Eduardo Valentin
@ 2013-04-23 3:38 ` Sachin Kamat
2013-04-23 12:44 ` Eduardo Valentin
0 siblings, 1 reply; 7+ messages in thread
From: Sachin Kamat @ 2013-04-23 3:38 UTC (permalink / raw)
To: Eduardo Valentin
Cc: linux-pm, rui.zhang, kgene.kim, patches, Amit Daniel Kachhap
On 22 April 2013 23:55, Eduardo Valentin <eduardo.valentin@ti.com> wrote:
> On 18-04-2013 07:37, Sachin Kamat wrote:
>>
>> clk_{un}prepare APIs are required to migrate to common
>> clock framework. While at it convert to use devm_clk_get as
>> it removes some cleanup code.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
>> ---
>> drivers/thermal/exynos_thermal.c | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/thermal/exynos_thermal.c
>> b/drivers/thermal/exynos_thermal.c
>> index e34d842..9df96e5 100644
>> --- a/drivers/thermal/exynos_thermal.c
>> +++ b/drivers/thermal/exynos_thermal.c
>> @@ -937,12 +937,16 @@ static int exynos_tmu_probe(struct platform_device
>> *pdev)
>> return ret;
>> }
>>
>> - data->clk = clk_get(NULL, "tmu_apbif");
>> + data->clk = devm_clk_get(&pdev->dev, "tmu_apbif");
>
>
> Here you are also changing the sequence from clk_get(NULL, ...) to
> clk_get(&pdev->dev, ...). Is your platform code ready to match to your
> device node?
Yes. This has been tested on Exynos4 and 5 DT enabled boards (Origen
4210, 4412 and Arndale).
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] Thermal: exynos: Add clk_{un}prepare APIs
2013-04-23 3:38 ` Sachin Kamat
@ 2013-04-23 12:44 ` Eduardo Valentin
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Valentin @ 2013-04-23 12:44 UTC (permalink / raw)
To: Sachin Kamat
Cc: Eduardo Valentin, linux-pm, rui.zhang, kgene.kim, patches,
Amit Daniel Kachhap
Rui,
On 22-04-2013 23:38, Sachin Kamat wrote:
> On 22 April 2013 23:55, Eduardo Valentin <eduardo.valentin@ti.com> wrote:
>> On 18-04-2013 07:37, Sachin Kamat wrote:
>>>
>>> clk_{un}prepare APIs are required to migrate to common
>>> clock framework. While at it convert to use devm_clk_get as
>>> it removes some cleanup code.
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
>>> ---
>>> drivers/thermal/exynos_thermal.c | 10 +++++++---
>>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/thermal/exynos_thermal.c
>>> b/drivers/thermal/exynos_thermal.c
>>> index e34d842..9df96e5 100644
>>> --- a/drivers/thermal/exynos_thermal.c
>>> +++ b/drivers/thermal/exynos_thermal.c
>>> @@ -937,12 +937,16 @@ static int exynos_tmu_probe(struct platform_device
>>> *pdev)
>>> return ret;
>>> }
>>>
>>> - data->clk = clk_get(NULL, "tmu_apbif");
>>> + data->clk = devm_clk_get(&pdev->dev, "tmu_apbif");
>>
>>
>> Here you are also changing the sequence from clk_get(NULL, ...) to
>> clk_get(&pdev->dev, ...). Is your platform code ready to match to your
>> device node?
>
> Yes. This has been tested on Exynos4 and 5 DT enabled boards (Origen
> 4210, 4412 and Arndale).
In this case, this patch looks fine to me.
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
>
^ permalink raw reply [flat|nested] 7+ messages in thread