mbox series

[0/2] thermal: rcar_gen3: Improve reading calibration fuses

Message ID 20241116172934.1829676-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
Headers show
Series thermal: rcar_gen3: Improve reading calibration fuses | expand

Message

Niklas Söderlund Nov. 16, 2024, 5:29 p.m. UTC
Hello,

This small series aims to remove the code duplication that was added 
when adding support for Gen4 devices. The logic to read the calibration 
fuses are identical for Gen3 and Gen4, but the registers are at 
different offsets.

Patch 1/2 is a small drive-by patch which fixes a style issue of the 
constants found when working on the fuses code. While patch 2/2 is the 
real work removing the code duplication.

It is tested on both Gen3 and Gen4 boards, but as not all boards have 
the fused calibration values and the driver fallback to hardcoded values 
only Gen4 have really been tested as I don't have access to a Gen3 board 
with fused calibration values.

Niklas Söderlund (2):
  thermal: rcar_gen3: Use lowercase hex constants
  thermal: rcar_gen3: Reuse logic to read fuses on Gen3 and Gen4

 drivers/thermal/renesas/rcar_gen3_thermal.c | 85 +++++++++------------
 1 file changed, 34 insertions(+), 51 deletions(-)