From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
Mike Turquette <mturquette@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
devicetree-discuss@lists.ozlabs.org,
linux-samsung-soc@vger.kernel.org,
Linux PM list <linux-pm@vger.kernel.org>,
Amit Daniel Kachhap <amit.kachhap@linaro.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
eduardo.valentin@ti.com
Subject: Re: [PATCH 2/6] thermal:exynos4: TMU Common clock framework support for TMU (Thermal Monitoring Unit)
Date: Fri, 19 Apr 2013 13:26:11 -0400 [thread overview]
Message-ID: <51717E33.60103@ti.com> (raw)
In-Reply-To: <1366389493-8239-3-git-send-email-l.majewski@samsung.com>
On 19-04-2013 12:38, Lukasz Majewski wrote:
> This patch modifies exynos_thermal.c file to use clk_disable_unprepare()
> and clk_prepare_enable() instead of clk_{enable|disable}.
>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/thermal/exynos_thermal.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
> index 46568c0..ba6094c 100644
> --- a/drivers/thermal/exynos_thermal.c
> +++ b/drivers/thermal/exynos_thermal.c
> @@ -584,7 +584,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
> int ret = 0, threshold_code, i, trigger_levs = 0;
>
> mutex_lock(&data->lock);
> - clk_enable(data->clk);
> + clk_prepare_enable(data->clk);
>
> status = readb(data->base + EXYNOS_TMU_REG_STATUS);
> if (!status) {
> @@ -655,7 +655,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
> data->base + EXYNOS_TMU_REG_INTCLEAR);
> }
> out:
> - clk_disable(data->clk);
> + clk_disable_unprepare(data->clk);
> mutex_unlock(&data->lock);
>
> return ret;
> @@ -668,7 +668,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
> unsigned int con, interrupt_en;
>
> mutex_lock(&data->lock);
> - clk_enable(data->clk);
> + clk_prepare_enable(data->clk);
>
> con = pdata->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT |
> pdata->gain << EXYNOS_TMU_GAIN_SHIFT;
> @@ -693,7 +693,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
> writel(interrupt_en, data->base + EXYNOS_TMU_REG_INTEN);
> writel(con, data->base + EXYNOS_TMU_REG_CONTROL);
>
> - clk_disable(data->clk);
> + clk_disable_unprepare(data->clk);
> mutex_unlock(&data->lock);
> }
>
> @@ -703,12 +703,12 @@ static int exynos_tmu_read(struct exynos_tmu_data *data)
> int temp;
>
> mutex_lock(&data->lock);
> - clk_enable(data->clk);
> + clk_prepare_enable(data->clk);
>
> temp_code = readb(data->base + EXYNOS_TMU_REG_CURRENT_TEMP);
> temp = code_to_temp(data, temp_code);
>
> - clk_disable(data->clk);
> + clk_disable_unprepare(data->clk);
> mutex_unlock(&data->lock);
>
> return temp;
> @@ -721,7 +721,7 @@ static void exynos_tmu_work(struct work_struct *work)
>
> exynos_report_trigger();
> mutex_lock(&data->lock);
> - clk_enable(data->clk);
> + clk_prepare_enable(data->clk);
> if (data->soc == SOC_ARCH_EXYNOS)
> writel(EXYNOS_TMU_CLEAR_RISE_INT |
> EXYNOS_TMU_CLEAR_FALL_INT,
> @@ -729,7 +729,7 @@ static void exynos_tmu_work(struct work_struct *work)
> else
> writel(EXYNOS4210_TMU_INTCLEAR_VAL,
> data->base + EXYNOS_TMU_REG_INTCLEAR);
> - clk_disable(data->clk);
> + clk_disable_unprepare(data->clk);
> mutex_unlock(&data->lock);
>
> enable_irq(data->irq);
> @@ -985,7 +985,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
> return ret;
> }
>
> - data->clk = clk_get(NULL, "tmu_apbif");
> + data->clk = clk_get(&pdev->dev, "tmu_apbif");
This change does not seam to be part of the patch orginal purpose, at
least not as described in your patch description.
> if (IS_ERR(data->clk)) {
> dev_err(&pdev->dev, "Failed to get clock\n");
> return PTR_ERR(data->clk);
>
next prev parent reply other threads:[~2013-04-19 17:26 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 16:38 [PATCH 0/6] thermal:exynos4: Thermal Measurement Unit fixes for Samsung SoCs Lukasz Majewski
2013-04-19 16:38 ` [PATCH 1/6] clk:exynos4:TMU Thermal Measurement Unit clock added to common clock framework Lukasz Majewski
2013-04-19 16:38 ` [PATCH 2/6] thermal:exynos4: TMU Common clock framework support for TMU (Thermal Monitoring Unit) Lukasz Majewski
2013-04-19 17:26 ` Eduardo Valentin [this message]
2013-04-19 18:08 ` Sachin Kamat
2013-04-23 6:17 ` Lukasz Majewski
2013-04-23 7:15 ` Sachin Kamat
2013-04-23 8:06 ` Lukasz Majewski
2013-04-23 8:42 ` Sachin Kamat
2013-04-19 16:38 ` [PATCH 3/6] thermal:exynos4: TMU device tree support for Exynos4412 targets Lukasz Majewski
2013-04-19 17:28 ` Eduardo Valentin
2013-04-23 6:18 ` Lukasz Majewski
2013-04-22 4:19 ` Sachin Kamat
2013-04-23 6:19 ` Lukasz Majewski
2013-04-19 16:38 ` [PATCH 4/6] thermal: Support for TMU regulator defined at device tree Lukasz Majewski
2013-04-19 17:23 ` Eduardo Valentin
2013-04-23 6:23 ` Lukasz Majewski
2013-04-23 15:01 ` Eduardo Valentin
2013-04-19 16:38 ` [PATCH 5/6] thermal:exynos4: Enable support for Exynos4412 SoCs Lukasz Majewski
2013-04-19 18:11 ` Sachin Kamat
2013-04-19 18:21 ` Tomasz Figa
2013-04-19 18:26 ` Sachin Kamat
2013-04-22 6:25 ` amit kachhap
2013-04-22 6:35 ` Lukasz Majewski
2013-04-22 6:40 ` Sachin Kamat
2013-04-19 16:38 ` [PATCH 6/6] thermal:exynos4: Add documentation for Exynos SoC thermal bindings Lukasz Majewski
2013-04-22 4:55 ` Sachin Kamat
2013-04-23 6:25 ` Lukasz Majewski
2013-04-23 7:09 ` Sachin Kamat
2013-04-22 16:51 ` [PATCH 0/6] thermal:exynos4: Thermal Measurement Unit fixes for Samsung SoCs Kukjin Kim
2013-04-23 6:26 ` Lukasz Majewski
2013-04-23 7:19 ` Sachin Kamat
2013-04-23 8:01 ` Lukasz Majewski
2013-04-25 12:30 ` [PATCH v2 0/4] Thermal:exynos: Thermal Measurement Unit fix and Samsung SoCs support Lukasz Majewski
2013-04-25 12:30 ` [PATCH v2 1/4] ARM: dts: thermal: exynos4: TMU device tree support for Exynos4412 targets Lukasz Majewski
2013-04-25 15:45 ` Eduardo Valentin
2013-04-29 4:57 ` amit daniel kachhap
2013-04-25 12:30 ` [PATCH v2 2/4] Thermal: exynos: Support for TMU regulator defined at device tree Lukasz Majewski
2013-04-25 13:09 ` amit daniel kachhap
2013-04-25 13:29 ` Lukasz Majewski
2013-04-25 15:44 ` Eduardo Valentin
2013-04-25 16:29 ` Lukasz Majewski
2013-04-27 0:50 ` Zhang Rui
2013-04-29 4:38 ` amit daniel kachhap
2013-04-29 4:35 ` amit daniel kachhap
2013-04-25 12:30 ` [PATCH v2 3/4] ARM: dts: thermal: exynos4: Add documentation for Exynos SoC thermal bindings Lukasz Majewski
2013-04-25 15:46 ` Eduardo Valentin
2013-04-29 5:01 ` amit daniel kachhap
2013-04-25 12:30 ` [PATCH v2 4/4] ARM:TMU:fix: Avoid lockup when first frequency table entry is CPUFREQ_ENTRY_INVALID Lukasz Majewski
2013-04-25 15:11 ` Eduardo Valentin
2013-04-25 15:22 ` Lukasz Majewski
2013-04-25 15:39 ` Eduardo Valentin
2013-04-25 15:39 ` [PATCH v2 0/4] Thermal:exynos: Thermal Measurement Unit fix and Samsung SoCs support Eduardo Valentin
2013-04-25 16:28 ` Lukasz Majewski
2013-04-26 5:05 ` Sachin Kamat
2013-04-26 6:39 ` Lukasz Majewski
2013-04-26 6:45 ` Sachin Kamat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51717E33.60103@ti.com \
--to=eduardo.valentin@ti.com \
--cc=amit.kachhap@linaro.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=l.majewski@samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.