]> asedeno.scripts.mit.edu Git - linux.git/commit
hwmon: (adm1275) Allow setting shunt reg value
authorKun Yi <kunyi@google.com>
Wed, 17 Oct 2018 22:26:39 +0000 (15:26 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 3 Dec 2018 00:25:28 +0000 (16:25 -0800)
commit6e5c06ad94115e58e4f274bdaed2618b1e39ac38
treea3387ddd7eb5f29ccf5621f22a2671c8504d0b91
parentf567035a6187f1a5e7f86d4da4dbbca46cb68082
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 <kunyi@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/adm1275
drivers/hwmon/pmbus/adm1275.c