mbox series

[v2,0/2] thermal: rcar_gen3: Use temperature approximation from datasheet

Message ID 20240327133013.3982199-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
Headers show
Series thermal: rcar_gen3: Use temperature approximation from datasheet | expand

Message

Niklas Söderlund March 27, 2024, 1:30 p.m. UTC
Hello,

When the driver was first added the temperature approximation was
reversed engineered from an out-of-tree driver as the datasheets of the
time did not contain this information. Recent datasheets, both Gen3 and
Gen4, now contains this information.

This series changes the temperature approximation formula to match
what's described in the datasheets. It has been tested on both Gen3 and
Gen4 with minimal changes in temperatures reported.

Patch 1 is a cleanup making the scope of a constant more clear. Patch 
2 is the real work changing the approximation formula.

Compared to v1 patch 3/3 have been squashed intro v2 patch 2/2. This is 
due to a suggestion from Geert where the precision in approximation 
could be increased while removing the need for the changed done in v1 
3/3, thanks Geert!

See individual patches for detailed changelog.

Niklas Söderlund (2):
  thermal: rcar_gen3: Move Tj_T storage to shared private data
  thermal: rcar_gen3: Update temperature approximation calculation

 drivers/thermal/rcar_gen3_thermal.c | 165 +++++++++++++++-------------
 1 file changed, 88 insertions(+), 77 deletions(-)

Comments

Daniel Lezcano April 22, 2024, 10:44 a.m. UTC | #1
On 27/03/2024 14:30, Niklas Söderlund wrote:
> Hello,
> 
> When the driver was first added the temperature approximation was
> reversed engineered from an out-of-tree driver as the datasheets of the
> time did not contain this information. Recent datasheets, both Gen3 and
> Gen4, now contains this information.
> 
> This series changes the temperature approximation formula to match
> what's described in the datasheets. It has been tested on both Gen3 and
> Gen4 with minimal changes in temperatures reported.
> 
> Patch 1 is a cleanup making the scope of a constant more clear. Patch
> 2 is the real work changing the approximation formula.
> 
> Compared to v1 patch 3/3 have been squashed intro v2 patch 2/2. This is
> due to a suggestion from Geert where the precision in approximation
> could be increased while removing the need for the changed done in v1
> 3/3, thanks Geert!
> 
> See individual patches for detailed changelog.

Applied, thanks