From 6e5c06ad94115e58e4f274bdaed2618b1e39ac38 Mon Sep 17 00:00:00 2001 From: Kun Yi Date: Wed, 17 Oct 2018 15:26:39 -0700 Subject: hwmon: (adm1275) Allow setting shunt reg value The ADM series of hotswap controllers support extending the current measurement range by using a sensing resistor value other than the typical 1 mOhm. For example, using a 0.5 mOhm sensing resistor doubles the maximal current can be measured. Current driver assumes a shunt resistor value of 1 mOhm in calculation, meaning for other resistor values, hwmon will report scaled current/power measurements. This patch parses device tree parameter "shunt-resistor-micro-ohms", if there is one. Signed-off-by: Kun Yi Signed-off-by: Guenter Roeck --- Documentation/hwmon/adm1275 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation/hwmon') diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275 index 39033538eb03..5e277b0d91ce 100644 --- a/Documentation/hwmon/adm1275 +++ b/Documentation/hwmon/adm1275 @@ -58,6 +58,9 @@ The ADM1075, unlike many other PMBus devices, does not support internal voltage or current scaling. Reported voltages, currents, and power are raw measurements, and will typically have to be scaled. +The shunt value in micro-ohms can be set via device tree at compile-time. Please +refer to the Documentation/devicetree/bindings/hwmon/adm1275.txt for bindings +if the device tree is used. Platform data support --------------------- -- cgit v1.2.3-55-g7522