Re: [PATCH v4 1/4] hwmon: (pmbus) Add and export direct conversion calculation helpers

From: Guenter Roeck

Date: Sat May 23 2026 - 09:25:53 EST


On 5/22/26 01:23, Stoyan Bogdanov wrote:
TPS25990 and upcoming TPS1689 need common computation APIs but
the current implementation is static to TPS25990. As a preparation for
TPS1689 support, split the math-only parts of pmbus_reg2data_direct() and
pmbus_data2reg_direct() into separate helper functions:

- pmbus_reg2data_direct_calc()
- pmbus_data2reg_direct_calc()

export them so the upcoming TPS1689 can use the same APIs.

This has no behavioral change on TPS25990 while allowing TPS1689
to use the same.

Signed-off-by: Stoyan Bogdanov <sbogdanov@xxxxxxxxxxxx>

Please do not introduce new API functions without discussing it first.
Keep this in the driver.

Thanks,
Guenter