Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH 0/2] thermal: rcar_gen3_thermal: Read calibration from fuses
@ 2021-10-11 22:58 Niklas Söderlund
  2021-10-11 22:58 ` [PATCH 1/2] thermal: rcar_gen3_thermal: Store thcode and ptat in priv data Niklas Söderlund
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Niklas Söderlund @ 2021-10-11 22:58 UTC (permalink / raw)
  To: Kuninori Morimoto, Daniel Lezcano, Geert Uytterhoeven, linux-pm
  Cc: linux-renesas-soc, Niklas Söderlund

Hello Morimoto-san,

This series allows the Gen3 thermal driver to read its calibration
values (THCODE and PTAT) from the fuses, if set. If the values are not
set the driver fall-back to the previously used pseudo values from the
datasheet.

I don't have access to a system where the fuses are set but I have been 
told that you Morimoto-san do have access to one. Would it be possible 
for you to test this series for me?

The test case is a rather straight forward boot test. The patches are 
based on recent changes to the driver but everything is included in 
v5.15-rc4. If you have time to build and boot these patches on top of 
that and just check two things I would be very happy.

1. Check that the driver uses the fused values, this is showed by the 
   log message, dev_info(dev, "Using fused calibration values\n"); is 
   trigged when the driver probe.

2. Check the temperature readings in sysfs are reasonable, the values are 
   in millidegree Celsius. On my system that uses the coefficients from 
   the driver I have 41-42 degrees Celsius at the moment.

   # grep . /sys/class/thermal/thermal_zone*/temp
   /sys/class/thermal/thermal_zone0/temp:41000
   /sys/class/thermal/thermal_zone1/temp:42000
   /sys/class/thermal/thermal_zone2/temp:41000

If these two checks are OK for you I think this patch is ready to be 
consumed. Thanks for your help!

Patch 1/2 prepare for reading the values from fuses by moving the
storage of the values used during calculation from global const to
members of the private data structures. While patch 2/2 populates the
private members with data from the fuses if available.

Niklas Söderlund (2):
  thermal: rcar_gen3_thermal: Store thcode and ptat in priv data
  thermal: rcar_gen3_thermal: Read calibration from hardware

 drivers/thermal/rcar_gen3_thermal.c | 113 +++++++++++++++++++++-------
 1 file changed, 86 insertions(+), 27 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-13 13:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-11 22:58 [PATCH 0/2] thermal: rcar_gen3_thermal: Read calibration from fuses Niklas Söderlund
2021-10-11 22:58 ` [PATCH 1/2] thermal: rcar_gen3_thermal: Store thcode and ptat in priv data Niklas Söderlund
2021-10-13 13:12   ` Geert Uytterhoeven
2021-10-11 22:58 ` [PATCH 2/2] thermal: rcar_gen3_thermal: Read calibration from hardware Niklas Söderlund
2021-10-13 13:27   ` Geert Uytterhoeven
2021-10-12  3:11 ` [PATCH 0/2] thermal: rcar_gen3_thermal: Read calibration from fuses Kuninori Morimoto
2021-10-12  8:24   ` Niklas Söderlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox