[PATCH v2 2/4] hwmon: (pmbus/ltc2978) Add support for LT7175 and LT7176P

From: Christopher de Guzman

Date: Tue Nov 10 2026 - 05:16:30 EST


Add support for the LT7175 and LT7176P PMBus buck regulators. Both
share the LT7170 family MFR_SPECIAL_ID (0x1C1D, masked to 0x1C10) and
use the same register layout and configuration as LT7170/LT7171.

Chips in this family are distinguished by their PMBUS_IC_DEVICE_ID
string. Instead of adding another strncmp() per chip, match the
returned string against ltc2978_id[], as is already done for the
PMBUS_MFR_MODEL fallback. Only entries whose name fits within the
returned data are compared, so the buffer is never read past the
returned length. Suffixed variants such as LT7175-1 match their base
entry.

Signed-off-by: Christopher de Guzman <christopher.deguzman@xxxxxxxxxx>
---
drivers/hwmon/pmbus/Kconfig | 6 +++---
drivers/hwmon/pmbus/ltc2978.c | 23 ++++++++++++++---------
2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index fd6641316454..63fb4d5dd87d 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -306,9 +306,9 @@ config SENSORS_LTC2978_REGULATOR
depends on SENSORS_LTC2978 && REGULATOR
help
If you say yes here you get regulator support for Linear Technology
- LT7170, LT7171, LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889,
- LTC7841, LTC7880, LTM4644, LTM4673, LTM4675, LTM4676, LTM4677,
- LTM4678, LTM4680, LTM4686, and LTM4700.
+ LT7170, LT7171, LT7175, LT7176P, LTC3880, LTC3883, LTC3884, LTC3886,
+ LTC3887, LTC3889, LTC7841, LTC7880, LTM4644, LTM4673, LTM4675, LTM4676,
+ LTM4677, LTM4678, LTM4680, LTM4686, and LTM4700.

config SENSORS_LTC3815
tristate "Linear Technologies LTC3815"
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index aea7b6c93e74..888db3213a01 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -23,8 +23,8 @@ enum chips {
/* Managers */
ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
/* Controllers */
- lt7170, lt7171, ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887,
- ltc3889, ltc7132, ltc7841, ltc7880,
+ lt7170, lt7171, lt7175, lt7176p, ltc3880, ltc3882, ltc3883, ltc3884,
+ ltc3886, ltc3887, ltc3889, ltc7132, ltc7841, ltc7880,
/* Modules */
ltm2987, ltm4664, ltm4673, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680,
ltm4686, ltm4700,
@@ -540,6 +540,8 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,
static const struct i2c_device_id ltc2978_id[] = {
{ .name = "lt7170", .driver_data = lt7170 },
{ .name = "lt7171", .driver_data = lt7171 },
+ { .name = "lt7175", .driver_data = lt7175 },
+ { .name = "lt7176p", .driver_data = lt7176p },
{ .name = "ltc2972", .driver_data = ltc2972 },
{ .name = "ltc2974", .driver_data = ltc2974 },
{ .name = "ltc2975", .driver_data = ltc2975 },
@@ -630,6 +632,7 @@ static int ltc2978_get_id(struct i2c_client *client)
chip_id &= LTC2978_ID_MASK;

if (chip_id == LT7170_ID) {
+ const struct i2c_device_id *id;
u8 buf[I2C_SMBUS_BLOCK_MAX];
int ret;

@@ -638,13 +641,11 @@ static int ltc2978_get_id(struct i2c_client *client)
if (ret < 0)
return ret;

- if (ret < 6)
- return -ENODEV;
-
- if (!strncmp(buf, "LT7170", 6))
- return lt7170;
- if (!strncmp(buf, "LT7171", 6))
- return lt7171;
+ for (id = &ltc2978_id[0]; strlen(id->name); id++) {
+ if (ret >= strlen(id->name) &&
+ !strncasecmp(id->name, buf, strlen(id->name)))
+ return (int)id->driver_data;
+ }

return -ENODEV;
}
@@ -762,6 +763,8 @@ static int ltc2978_probe(struct i2c_client *client)
switch (data->id) {
case lt7170:
case lt7171:
+ case lt7175:
+ case lt7176p:
data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING;
info->read_word_data = ltc3883_read_word_data;
info->pages = LTC3883_NUM_PAGES;
@@ -962,6 +965,8 @@ static int ltc2978_probe(struct i2c_client *client)
static const struct of_device_id ltc2978_of_match[] = {
{ .compatible = "lltc,lt7170" },
{ .compatible = "lltc,lt7171" },
+ { .compatible = "lltc,lt7175" },
+ { .compatible = "lltc,lt7176p" },
{ .compatible = "lltc,ltc2972" },
{ .compatible = "lltc,ltc2974" },
{ .compatible = "lltc,ltc2975" },

--
2.43.0