From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: linux-pm@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>
Subject: Re: [PATCH 1/7] thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796
Date: Tue, 7 Mar 2017 11:27:31 +0100 [thread overview]
Message-ID: <20170307102731.GH20587@bigcity.dyn.berto.se> (raw)
In-Reply-To: <20170306200401.29923-2-niklas.soderlund+renesas@ragnatech.se>
On 2017-03-06 21:03:55 +0100, Niklas Söderlund wrote:
> The .thermal_init needs to be delayed a short amount of to allow for the
> TEMP register to contain something useful. If it's not delayed theses
> warnings are common during boot:
>
> thermal thermal_zone0: failed to read out thermal zone (-5)
> thermal thermal_zone1: failed to read out thermal zone (-5)
> thermal thermal_zone2: failed to read out thermal zone (-5)
>
> The warnings are triggered by the first call to .get_temp while the TEMP
> register contains 0 and rcar_gen3_thermal_get_temp() returns -EIO since
> a TEMP value of 0 will result in a temperature reading which is out of
> specifications.
>
> This should have been done in the initial commit which adds the driver
> as the same issue was found and corrected for r8a7795.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
I forgot this tag for this patch, will update if there is a need for v2.
Fixes: 564e73d283af9d4c ("thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver")
> ---
> drivers/thermal/rcar_gen3_thermal.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
> index d33c845244b1d819..ec477d47d0bae8e5 100644
> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -222,6 +222,8 @@ static void r8a7796_thermal_init(struct rcar_gen3_thermal_tsc *tsc)
> reg_val = rcar_gen3_thermal_read(tsc, REG_GEN3_THCTR);
> reg_val |= THCTR_THSST;
> rcar_gen3_thermal_write(tsc, REG_GEN3_THCTR, reg_val);
> +
> + usleep_range(1000, 2000);
> }
>
> static const struct rcar_gen3_thermal_data r8a7795_data = {
> --
> 2.12.0
>
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2017-03-07 10:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 20:03 [PATCH 0/7] thermal: rcar_gen3_thermal: add support for interrupt triggerd trip points Niklas Söderlund
2017-03-06 20:03 ` [PATCH 1/7] thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796 Niklas Söderlund
2017-03-07 9:49 ` Sergei Shtylyov
2017-03-07 10:28 ` Niklas Söderlund
2017-03-07 10:27 ` Niklas Söderlund [this message]
2017-03-07 15:39 ` Geert Uytterhoeven
2017-03-07 19:51 ` Wolfram Sang
2017-03-06 20:03 ` [PATCH 2/7] thermal: rcar_gen3_thermal: fix probe error path Niklas Söderlund
2017-03-07 15:19 ` Geert Uytterhoeven
2017-03-07 19:52 ` Wolfram Sang
2017-03-17 10:12 ` Niklas Söderlund
2017-03-06 20:03 ` [PATCH 3/7] thermal: rcar_gen3_thermal: remove unneeded mutex Niklas Söderlund
2017-03-07 15:22 ` Geert Uytterhoeven
2017-03-07 19:53 ` Wolfram Sang
2017-03-06 20:03 ` [PATCH 4/7] thermal: rcar_gen3_thermal: record more information about each TSC Niklas Söderlund
2017-03-07 15:31 ` Geert Uytterhoeven
2017-03-07 15:41 ` Geert Uytterhoeven
2017-03-07 19:55 ` Wolfram Sang
2017-03-06 20:03 ` [PATCH 5/7] thermal: rcar_gen3_thermal: enable hardware interrupts for trip points Niklas Söderlund
2017-03-07 15:36 ` Geert Uytterhoeven
2017-03-17 10:07 ` Niklas Söderlund
2017-03-07 19:55 ` Wolfram Sang
2017-03-17 10:06 ` Niklas Söderlund
2017-03-21 13:50 ` Geert Uytterhoeven
2017-03-06 20:04 ` [PATCH 6/7] thermal: rcar_gen3_thermal: store device match data in private structure Niklas Söderlund
2017-03-07 15:37 ` Geert Uytterhoeven
2017-03-07 19:55 ` Wolfram Sang
2017-03-06 20:04 ` [PATCH 7/7] thermal: rcar_gen3_thermal: add suspend and resume support Niklas Söderlund
2017-03-07 15:38 ` Geert Uytterhoeven
2017-03-07 19:55 ` Wolfram Sang
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=20170307102731.GH20587@bigcity.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=edubezval@gmail.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=wsa+renesas@sang-engineering.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).