Re: [PATCH 4.19.y-cip 02/10] thermal: rcar_gen3_thermal: Remove temperature bound


Biju Das <biju.das.jz@...>
 

Hi Niklas,

Thanks for your feedback.

Cheers,
Biju

-----Original Message-----
From: Niklas <niklas.soderlund@...>
Sent: 26 August 2020 09:46
To: Biju Das <biju.das.jz@...>
Cc: Pavel Machek <pavel@...>; cip-dev@...; Nobuhiro
Iwamatsu <nobuhiro1.iwamatsu@...>; Chris Paterson
<Chris.Paterson2@...>; Prabhakar Mahadev Lad
<prabhakar.mahadev-lad.rj@...>
Subject: Re: [PATCH 4.19.y-cip 02/10] thermal: rcar_gen3_thermal: Remove
temperature bound

Hi Biju,

On 2020-08-26 07:40:46 +0000, Biju Das wrote:
Hi Pavel,

Thanks for the feedback.

Subject: Re: [PATCH 4.19.y-cip 02/10] thermal: rcar_gen3_thermal:
Remove temperature bound

On Tue 2020-08-25 14:21:48, Biju Das wrote:
From: Niklas Söderlund <niklas.soderlund+renesas@...>

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.
Niklas, Can you please clarify?
IIRC I was asked to remove the clamp as the hardware team had tested the
sensors in a wider range and it was judged better to report a reading even if
it was not guaranteed then to clamp it. I have not been able myself to test
this change myself and rely on the report from the hardware team.


Cheers,
Biju




+++ 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

Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten
Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf,
Arcadiastrasse 10, 40472 Duesseldorf, Germany,
Handelsregister/Commercial Register: Duesseldorf, HRB 3708
USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg.
no.: DE 14978647
--
Regards,
Niklas Söderlund

Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647

Join cip-dev@lists.cip-project.org to automatically receive all group messages.