[PATCH v6 0/3] Rework TPS25990 direct conversions and add TPS1689 support
Stoyan Bogdanov <[email protected]> Wed, 5 Aug 2026 12:03:54 +0300
| Newsgroups | org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This series reworks the TPS25990 PMBus driver and adds TPS1689 support. Both devices share most internal functionality, differing mainly in supported voltage and current operating ranges. Link to V5 at [3] v6: - Remove special-case conditioning for IIN_OCF so both TPS25990 and TPS1689 use the same logic. - Add scaling for TPS1689 VIN_OV_FAULT according to the datasheet VIN_OV_FLT table, keep the existing behavior for TPS25990. - Fix incorrect PMBus Direct format conversion coefficients (m, b, R) for TPS1689 PSC_VOLTAGE_IN in struct pmbus_driver_info. - Add missing PMBUS_HAVE_IOUT flag in pmbus_driver_info .func for TPS1689 - Restore the const qualifier on struct pmbus_driver_info, which was removed unintentionally. - Update i2c_device_id to follow I2C subsystem coding style by using the .name and .driver_data initializers. Link to V4 at [2] v5: - Simplify implementation and remove calculations from the driver, as they are not needed and were implemented incorrectly. Thanks Guenter for taking the time to explain. - Drop pmbus API changes, as they are not actually needed. - Add conditioning to separate TPS1689 and TPS25990 by chip_id in tps25990_read_word_data() and tps25990_write_word_data() for PMBUS_VIN_OV_FAULT_LIMIT and PMBUS_IIN_OC_FAULT_LIMIT. The TPS1689 value is not 4-bit, so it does not need adjusting. Keep the current adjustment logic only for TPS25990. Link to V3 at [1] v4: - Fix non-devicetree support as reported by Guenter Roeck - Rework direct conversion handling to use exported PMBus core helpers instead of driver-local implementations - Update dt-bindings commit message and ti,tps25990.yaml - Clarify commit messages to better reflect the final implementation - Add and export direct conversion helpers from pmbus_core - Eliminate duplicated conversion code in the driver V3: - Fix error detected from kernel test bot regarding division Tests: - Test builds for x86_64, arm64, i386 - Retest driver on arm64 - Validate driver direct conversion functions manualy V2: - Fix error detected from kernel test bot - Add Acked-by to dt-bindings commit - Drop "support" from dt-bindings commit subject [1] https://lore.kernel.org/all/[email protected]/ [2] https://lore.kernel.org/all/[email protected]/ [3] https://lore.kernel.org/all/[email protected]/ Stoyan Bogdanov (3): hwmon: (pmbus/tps25990): Rework driver for multi-device support dt-bindings: hwmon: pmbus/tps25990: Add TPS1689 hwmon: (pmbus/tps25990): Add TPS1689 support .../bindings/hwmon/pmbus/ti,tps25990.yaml | 8 +- Documentation/hwmon/tps25990.rst | 15 +- drivers/hwmon/pmbus/tps25990.c | 227 +++++++++++++----- 3 files changed, 181 insertions(+), 69 deletions(-) -- 2.43.0