From: "Pavel Machek" <pavel@ucw.cz>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: cip-dev@lists.cip-project.org,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
Pavel Machek <pavel@denx.de>,
Chris Paterson <chris.paterson2@renesas.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [cip-dev] [PATCH 4.19.y-cip 02/10] thermal: rcar_gen3_thermal: Remove temperature bound
Date: Wed, 26 Aug 2020 09:21:32 +0200 [thread overview]
Message-ID: <20200826072132.GA7244@amd> (raw)
In-Reply-To: <20200825132156.7839-3-biju.das.jz@bp.renesas.com>
[-- Attachment #1.1: Type: text/plain, Size: 1353 bytes --]
On Tue 2020-08-25 14:21:48, Biju Das wrote:
> From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>
> commit 0f510a2457cbbba18a98492bab1bf540be57ebd1 upstream.
>
> The hardware manual states that the operation of the sensor is not
> guaranteed with temperatures above 125°C, not that the readings are
> invalid. Remove the bound check and try to deliver temperature readings
> even if we are outside the guaranteed operation range.
I'm tempted to ask "how was this tested?" :-).
Sometimes sensors have glitches producing very high values in normal
temperatures, and it such case clamping can be useful, but I'll assume
your sensor works ok.
Best regards,
Pavel
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -182,9 +182,7 @@ static int rcar_gen3_thermal_get_temp(void *devdata, int *temp)
> tsc->coef.a2);
> mcelsius = FIXPT_TO_MCELSIUS(val);
>
> - /* Make sure we are inside specifications */
> - if ((mcelsius < MCELSIUS(-40)) || (mcelsius > MCELSIUS(125)))
> - return -EIO;
> + /* Guaranteed operating range is -40C to 125C. */
>
> /* Round value to device granularity setting */
> *temp = rcar_gen3_thermal_round(mcelsius);
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 419 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5254): https://lists.cip-project.org/g/cip-dev/message/5254
Mute This Topic: https://lists.cip-project.org/mt/76406706/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2020-08-26 7:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 13:21 [cip-dev] [PATCH 4.19.y-cip 00/10] Add OPP/Thermal/Timer/CAN[FD] support Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 01/10] arm64: dts: renesas: r8a774e1: Add operating points Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 02/10] thermal: rcar_gen3_thermal: Remove temperature bound Biju Das
2020-08-26 7:21 ` Pavel Machek [this message]
2020-08-26 7:40 ` Biju Das
2020-08-26 8:45 ` Niklas
2020-08-26 9:16 ` Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 03/10] thermal: rcar_gen3_thermal: Generate interrupt when temperature changes Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 04/10] thermal/drivers/rcar_gen3: Fix undefined temperature if negative Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 05/10] thermal: rcar_gen3_thermal: Add r8a774e1 support Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 06/10] arm64: dts: renesas: r8a774e1: Add RZ/G2H thermal support Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 07/10] arm64: dts: renesas: r8a774e1: Add CMT device nodes Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 08/10] arm64: dts: renesas: r8a774e1: Add TMU " Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 09/10] can: rcar_can: Remove unused platform data support Biju Das
2020-08-25 13:21 ` [cip-dev] [PATCH 4.19.y-cip 10/10] arm64: dts: renesas: r8a774e1: Add CAN[FD] support Biju Das
2020-08-26 6:42 ` [cip-dev] [PATCH 4.19.y-cip 00/10] Add OPP/Thermal/Timer/CAN[FD] support Nobuhiro Iwamatsu
2020-08-26 7:24 ` Pavel Machek
2020-08-28 18:15 ` Pavel Machek
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=20200826072132.GA7244@amd \
--to=pavel@ucw.cz \
--cc=biju.das.jz@bp.renesas.com \
--cc=chris.paterson2@renesas.com \
--cc=cip-dev@lists.cip-project.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=pavel@denx.de \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.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).