Re: [PATCH RESEND 5.10.y-cip 03/13] thermal/drivers: Add TSU driver for RZ/G2L


Pavel Machek
 

Hi!

commit 673c68bd48390dad01f7d17670de3e33b60860ac upstream.

The RZ/G2L SoC incorporates a thermal sensor unit (TSU) that
measures the temperature inside the LSI.

The thermal sensor in this unit measures temperatures in the range
from
???40 degree Celsius to 125 degree Celsius with an accuracy of ??3°C.
The TSU repeats measurement at 20 microseconds intervals and
automatically updates the results of measurement.

The TSU has no interrupts as well as no external pins.

This patch adds Thermal Sensor Unit(TSU) driver for RZ/G2L SoC.
+#define TSU_SS_CONV_RUNNING BIT(0)
+
+#define TS_CODE_AVE_SCALE(x) ((x) * 1000000)
+#define MCELSIUS(temp) ((temp) * MILLIDEGREE_PER_DEGREE)
+#define TS_CODE_CAP_TIMES 8 /* Capture times */
Two spaces, plus "capture times" does not really explain much.
OK, will fix the 2 spaces. For " capture times" Basically we need to read
TSU_SAD register eight times consecutively at 20 microseconds interval.

I will try to drop the comment /* Capture times */ from mainline, if it
does not really explain the intention.
Or

What about "Total number of ADC data samples"? Does it better?
Please let me know.
Yes, that sounds better.

Thanks,
Pavel

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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