[PATCH v2 0/4] hwmon: (ltc2945): add support for sense resistor

Alexandru Ardelean
2020-11-11T09:08:25Z

This changeset adds support the sense resistor that can be connected on
a board to computer current & power.

The sense resistor is a parameter of the board. It should be configured in
the driver via a device-tree / ACPI property, so that the proper current
measurements can be done in the driver.

Changelog v1 -> v2:
* https://lore.kernel.org/linux-hwmon/20201106101825.30960-1-alexandru.ardelean@analog.com/
* reverted kstrotoull() -> kstrtoul()
* added sanity check for resistor, to prevent crashing when DT provides
zero value
* add DT binding doc for ltc2945

Alexandru Ardelean (4):
hwmon: (ltc2945): wrap regmap into an ltc2945_state struct
docs: hwmon: (ltc2945): change type of val to ULL in
ltc2945_val_to_reg()
hwmon: (ltc2945): add support for sense resistor
dt-bindings: hwmon: ltc2945: add device tree doc for ltc2945

.../bindings/hwmon/adi,ltc2945.yaml | 49 ++++++++++
drivers/hwmon/ltc2945.c | 89 +++++++++++--------
2 files changed, 103 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/hwmon/adi,ltc2945.yaml

--
2.17.1