Devicetree
 help / color / mirror / Atom feed
From: Tomasz Figa <t.figa@samsung.com>
To: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: linux-pm@vger.kernel.org, naveenkrishna.ch@gmail.com,
	rui.zhang@intel.com, eduardo.valentin@ti.com,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	amit.daniel@samsung.com, kgene.kim@samsung.com,
	devicetree@vger.kernel.org, b.zolnierkie@samsung.com,
	cpgs@samsung.com
Subject: Re: [PATCH] thermal: exynos: handle gate clock for misplaced TRIMINFO register
Date: Thu, 07 Nov 2013 15:18:57 +0100	[thread overview]
Message-ID: <1695605.pk9l7dqkqm@amdc1227> (raw)
In-Reply-To: <1383828154-428-1-git-send-email-ch.naveen@samsung.com>

Hi Naveen,

On Thursday 07 of November 2013 18:12:34 Naveen Krishna Chatradhi wrote:
> On Exynos5420 the TMU(4) for GPU has a seperate clock enable bit from
> the other TMU channels(0 ~ 3). Hence, accessing TRIMINFO for base_second
> should be acompanied by enabling the respective clock.
> 
> This patch which allow for a "clk_sec" clock to be specified in the
> device-tree which will be ungated when accessing the TRIMINFO register.
> 
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> ---
>  drivers/thermal/samsung/exynos_tmu.c |   24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)

This patch modifies the device binding, but fails to mention anything
about the modification in respective documentation. Please do not do that.

In addition, since the series adding support for Exynos 5420 has not been
merged yet, I would rather make this patch a part of that series.

Also please see my comment below.

> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index b54825a..33edd1a 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
[snip]
> @@ -641,6 +650,15 @@ static int exynos_tmu_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> +	data->clk_sec = devm_clk_get(&pdev->dev, "tmu_apbif_sec");
> +	if (!IS_ERR(data->clk_sec)) {

This code does not check if the clock was specified for TMU channels that
require it, i.e. the driver will not fail if you don't specify this clock.

Instead, it would be better create a separate compatible value for such
channels, like "samsung,exynos5420-tmu-broken-triminfo", for which this
clock would be mandatory and for which, if this clock is not specified,
the driver would fail.

Best regards,
Tomasz


  reply	other threads:[~2013-11-07 14:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 12:42 [PATCH] thermal: exynos: handle gate clock for misplaced TRIMINFO register Naveen Krishna Chatradhi
2013-11-07 14:18 ` Tomasz Figa [this message]
2013-11-07 15:11   ` Naveen Krishna Ch
2014-01-02  6:07 ` Zhang Rui
2014-02-07  9:33   ` Naveen Krishna Ch
2014-02-10 10:33 ` Mark Rutland
2014-02-10 10:50   ` Naveen Krishna Ch
2014-02-10 11:07     ` Mark Rutland
     [not found]       ` <20140210110723.GV25314-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-02-10 11:09         ` Naveen Krishna Ch

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=1695605.pk9l7dqkqm@amdc1227 \
    --to=t.figa@samsung.com \
    --cc=amit.daniel@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=ch.naveen@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eduardo.valentin@ti.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=naveenkrishna.ch@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox