linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	Lukasz Majewski <l.majewski@samsung.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Grant Likely <grant.likely@linaro.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>, Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCHv2 1/1] thermal: cpu_cooling: check for the readiness of cpufreq layer
Date: Fri, 28 Nov 2014 13:35:49 +0530	[thread overview]
Message-ID: <CAKohponu_PRrqsuMdCJDznhiO_-=iCaYPhCCad8F4WS3rNxo5A@mail.gmail.com> (raw)
In-Reply-To: <1417097577-3548-1-git-send-email-edubezval@gmail.com>

On 27 November 2014 at 19:42, Eduardo Valentin <edubezval@gmail.com> wrote:
> (I'm sorry VireshK, I am still using my normal practice) :-)

That's fine :)

> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index 1ab0018..bed3fa2 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -440,6 +440,11 @@ __cpufreq_cooling_register(struct device_node *np,
>         int ret = 0, i;
>         struct cpufreq_policy policy;
>
> +       if (!cpufreq_frequency_get_table(0)) {
> +               pr_err("cpu_cooling: cpufreq layer not ready! Deferring.\n");

Throwing an error here doesn't look to be the right thing. Ultimately
we will register the cooling dev when probed again after some time.

So, a pr_debug() suits more here.

Also, this breaks existing exynos thermal drivers as they don't handle
-EPROBE_DEFER well right now.

I reached here, because one of my patches had something similar to what
you wrote. Just for this file though, haven't updated any other drivers though.

Will be sending you my small patchset by end of day today, please see if
they make any sense at all..

  reply	other threads:[~2014-11-28  8:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 14:12 [PATCHv2 1/1] thermal: cpu_cooling: check for the readiness of cpufreq layer Eduardo Valentin
2014-11-28  8:05 ` Viresh Kumar [this message]
2014-11-28 10:18   ` Lukasz Majewski
2014-11-28 13:14     ` Eduardo Valentin
2014-11-28 13:43       ` Viresh Kumar

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='CAKohponu_PRrqsuMdCJDznhiO_-=iCaYPhCCad8F4WS3rNxo5A@mail.gmail.com' \
    --to=viresh.kumar@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).