diff mbox series

[3/3] thermal: rcar_gen3: Increase granularity of readings

Message ID 20240307110216.2962918-4-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State New
Delegated to: Daniel Lezcano
Headers show
Series thermal: rcar_gen3: Use temperature approximation from datasheet | expand

Commit Message

Niklas Söderlund March 7, 2024, 11:02 a.m. UTC
Later versions of the datasheet (Gen3 rev 2.30) have examples of
temperature approximations with one decimal. Increase the granularity
when reporting temperatures to match this.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/thermal/rcar_gen3_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Geert Uytterhoeven March 20, 2024, 1:27 p.m. UTC | #1
On Thu, Mar 7, 2024 at 12:03 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> Later versions of the datasheet (Gen3 rev 2.30) have examples of
> temperature approximations with one decimal. Increase the granularity
> when reporting temperatures to match this.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 56fba675b986..fa4c6da8e460 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -135,7 +135,7 @@  static inline void rcar_gen3_thermal_write(struct rcar_gen3_thermal_tsc *tsc,
  * of values. The values for each model is stored in the device match data.
  */
 
-#define RCAR3_THERMAL_GRAN 500 /* mili Celsius */
+#define RCAR3_THERMAL_GRAN 100 /* millidegree Celsius */
 
 static void rcar_gen3_thermal_calc_coefs(struct rcar_gen3_thermal_priv *priv,
 					 struct rcar_gen3_thermal_tsc *tsc)