(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

hwmon: (pmbus/ltc4286) Add writable shunt_resistor sysfs attribute

The LTC4286/LTC4287 driver uses rsense to scale current and power telemetry. rsense is board-specific rather than a fixed device characteristic, and may differ across qualified BOM variants using the same software image. If rsense does not match the installed board configuration, current and power readings are mis-scaled. Add a writable shunt_resistor sysfs attribute so userspace can update the board calibration value after platform identification. Initialize rsense from shunt-resistor-micro-ohms as before (or the existing default when absent), and validate runtime updates before recalculating the current/power scaling coefficients. Signed-off-by: Carl Lee <carl.lee@amd.com> Link: https://patch.msgid.link/20260907-hwmon-pmbus-ltc4286-add-runtime-shunt-resistor-control-v2-1-5f47f7e5a1bb@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>


Author Carl Lee Committer Guenter Roeck Date Commit Parent 24195688
+92 -4
1 changed file
+92 -4
1 changed file