[PATCH v6 0/2] Variety of fixes and new features for mr75203 driver

From: Eliav Farber
Date: Wed Sep 21 2022 - 08:19:16 EST


List of fixes:
- Fix "intel,vm-map" property to be optional.
- Fix VM sensor allocation when "intel,vm-map" not defined.
- Fix multi-channel voltage reading.
- Fix voltage equation for negative source input.
- Modify the temperature equation according to series 5 datasheet.
- Fix coding style issue.

List of new features:
- Modify "reset" property to be optional.
- Add optional "moortec,vm-active-channels" property to define the number
of active channels per VM.
- Add support for mr76006 pre-scaler to multiply the voltage result by 2.
- Add support for series 6 temperature equation.
- Add coefficient properties to fine tune the temperature equation.
- Add debugfs to read and write temperature coefficients

---------

Changes between v5 and v6:
- fix undefined reference to `__divdi3' for 32-bit machines.

!!! Note: The patches of this series were pushed to hwmon-next and then
I got an automatic reply saying that these patches failed on some builds.
I sent separately an incremental patch which fixes the problem, and in
addition these two "replacement" patches for you do choose the option
you prefer. !!!

Changes between v4 and v5:
- 0004: Add detailed comment in code explaining the cast and the div instead of
right shift or use of BIT().
- 0011: Fix typo in description (nou --> not).
- 0020: Return j coefficient to use debugfs_create_file() instead of
debugfs_create_u32() because j is signed.
- 0021: Move the coding style patch to be last in the series (it does not fix
the code), and remove the "Fixes:" tag.

Changes between v3 and v4:
*) Provide a Fixes tag for all fixes in the series.
*) Start series with fixes.
*) New patch to add description in moortec,mr75203.yaml.
*) New patch to add moortec to vendor-prefixes.
*) Fix moortec,mr75203.yaml checker errors.
*) Remove validation of device-tree parameters.
*) Fix per patch specific comments (detailed in each patch).

Changes between v2 and v3:
*) Add "moortec" prefix to all new device-tree properties.
*) Change order of patches.
*) Add explanations to better understand the changes.
*) Change "reset" property to be optional and remove the
"reset-control-skip" property.
*) Split the patch for "fix multi-channel voltage reading" to two
patches.
*) Change pre-scaler property format and fix typo (scalar --> scaler).
*) Fix voltage equation to support negative values instead of limiting
value to zero.
*) Temperature equation - protect from overflow and add clamping.
*) Add new "moortec,ts-series" property to select between temperature
equation of series 5 or series 6.

Changes between v1 and v2:
*) Fix compilation error for patch 08/16:
"warning: ISO C90 forbids variable length array"

---------

Eliav Farber (2):
hwmon: (mr75203) modify the temperature equation according to series 5
datasheet
hwmon: (mr75203) add support for series 6 temperature equation

drivers/hwmon/mr75203.c | 91 +++++++++++++++++++++++++++++++++++++----
1 file changed, 83 insertions(+), 8 deletions(-)

--
2.37.1