All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Simon Horman <horms+renesas@verge.net.au>,
	Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>
Cc: Magnus Damm <magnus.damm@gmail.com>,
	linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Yoshihiro Kaneko <ykaneko0929@gmail.com>
Subject: Re: [PATCH repost] thermal: rcar_thermal: update calculation formula for E3
Date: Thu, 18 Apr 2019 11:17:28 +0300	[thread overview]
Message-ID: <bd0c1fc6-782d-36b7-5916-1fda21d54145@cogentembedded.com> (raw)
In-Reply-To: <20190418071514.13027-1-horms+renesas@verge.net.au>

On 18.04.2019 10:15, Simon Horman wrote:

> From: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> 
> HW manual changes temperature calculation formula for E3:
> - When CTEMP is less than 24
>     T = CTEMP[5:0] * 5.5 - 72
> - When CTEMP is equal to/greater than 24
>     T = CTEMP[5:0] * 5 - 60
> 
> This was inspired by a patch in the BSP by Van Do <van.do.xw@renesas.com>
> 
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> Tested-by: Simon Horman <horms+renesas@verge.net.au>
> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>   drivers/thermal/rcar_thermal.c | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 97462e9b40d8..11df0cc63bed 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
[...]
> @@ -263,7 +267,12 @@ static int rcar_thermal_get_current_temp(struct rcar_thermal_priv *priv,
>   		return ret;
>   
>   	mutex_lock(&priv->lock);
> -	tmp =  MCELSIUS((priv->ctemp * 5) - 65);
> +	if (priv->chip->ctemp_bands == 1)
> +		tmp =  MCELSIUS((priv->ctemp * 5) - 65);
                      ^ stray space?

> +	else if (priv->ctemp < 24)
> +		tmp = MCELSIUS(((priv->ctemp * 55) - 720) / 10);
> +	else
> +		tmp = MCELSIUS((priv->ctemp * 5) - 60);
>   	mutex_unlock(&priv->lock);
>   
>   	if ((tmp < MCELSIUS(-45)) || (tmp > MCELSIUS(125))) {

MBR, Sergei

      parent reply	other threads:[~2019-04-18  8:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18  7:15 [PATCH repost] thermal: rcar_thermal: update calculation formula for E3 Simon Horman
2019-04-18  8:12 ` Niklas Söderlund
2019-04-24  7:10   ` Geert Uytterhoeven
2019-04-26  9:55     ` Simon Horman
2019-05-07 22:14       ` Niklas Söderlund
2019-05-08 11:09         ` Simon Horman
2019-04-18  8:17 ` Sergei Shtylyov [this message]

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=bd0c1fc6-782d-36b7-5916-1fda21d54145@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=edubezval@gmail.com \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=rui.zhang@intel.com \
    --cc=ykaneko0929@gmail.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.