Re: [PATCH v2] hwmon: (pmbus/ltc4286) Add writable shunt_resistor sysfs attribute

From: Guenter Roeck

Date: Tue Sep 08 2026 - 12:25:32 EST


On Mon, Sep 07, 2026 at 03:58:32PM +0800, Carl Lee wrote:
> 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@xxxxxxx>

Applied.

Thanks,
Guenter