Skip to content

Commit 18e7bb6

Browse files
committed
hwmon: (pmbus/ltc2978) add support for ltm4673
Add support for LTM4673. The LTM4673 is a quad output, dual 12A and dual 5A, switching mode DC/DC step-down μModule regulator integrated with 4-channel power system manager. This adds only the chip id, the checks for the manufacturer special id, and the relevant attributes for the device's pmbus_driver_info. The device does not support clear peaks. Signed-off-by: Cedric Encarnacion <[email protected]>
1 parent 4aa18bc commit 18e7bb6

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

drivers/hwmon/pmbus/Kconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ config SENSORS_LTC2978_REGULATOR
216216
help
217217
If you say yes here you get regulator support for Linear Technology
218218
LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889, LTC7841,
219-
LTC7880, LTM4644, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
220-
LTM4686, and LTM4700.
219+
LTC7880, LTM4644, LTM4673, LTM4675, LTM4676, LTM4677, LTM4678,
220+
LTM4680, LTM4686, and LTM4700.
221221

222222
config SENSORS_LTC3815
223223
tristate "Linear Technologies LTC3815"

drivers/hwmon/pmbus/ltc2978.c

+23-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ enum chips {
2626
ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7841,
2727
ltc7880,
2828
/* Modules */
29-
ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
30-
ltm4700,
29+
ltm2987, ltm4664, ltm4673, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680,
30+
ltm4686, ltm4700,
3131
};
3232

3333
/* Common for all chips */
@@ -88,6 +88,8 @@ enum chips {
8888
#define LTC3889_ID 0x4900
8989
#define LTC7880_ID 0x49E0
9090
#define LTM4664_ID 0x4120
91+
#define LTM4673_ID_REV1 0x0230
92+
#define LTM4673_ID 0x4480
9193
#define LTM4675_ID 0x47a0
9294
#define LTM4676_ID_REV1 0x4400
9395
#define LTM4676_ID_REV2 0x4480
@@ -555,6 +557,7 @@ static const struct i2c_device_id ltc2978_id[] = {
555557
{"ltc7880", ltc7880},
556558
{"ltm2987", ltm2987},
557559
{"ltm4664", ltm4664},
560+
{"ltm4673", ltm4673},
558561
{"ltm4675", ltm4675},
559562
{"ltm4676", ltm4676},
560563
{"ltm4677", ltm4677},
@@ -664,6 +667,8 @@ static int ltc2978_get_id(struct i2c_client *client)
664667
return ltm2987;
665668
else if (chip_id == LTM4664_ID)
666669
return ltm4664;
670+
else if (chip_id == LTM4673_ID || chip_id == LTM4673_ID_REV1)
671+
return ltm4673;
667672
else if (chip_id == LTM4675_ID)
668673
return ltm4675;
669674
else if (chip_id == LTM4676_ID_REV1 || chip_id == LTM4676_ID_REV2 ||
@@ -867,6 +872,21 @@ static int ltc2978_probe(struct i2c_client *client)
867872
| PMBUS_HAVE_IOUT
868873
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
869874
break;
875+
case ltm4673:
876+
data->features |= FEAT_NEEDS_POLLING;
877+
info->read_word_data = ltc2975_read_word_data;
878+
info->pages = LTC2974_NUM_PAGES;
879+
info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT
880+
| PMBUS_HAVE_TEMP2;
881+
for (i = 0; i < info->pages; i++) {
882+
info->func[i] |= PMBUS_HAVE_IIN
883+
| PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
884+
| PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
885+
| PMBUS_HAVE_PIN
886+
| PMBUS_HAVE_POUT
887+
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
888+
}
889+
break;
870890
default:
871891
return -ENODEV;
872892
}
@@ -923,6 +943,7 @@ static const struct of_device_id ltc2978_of_match[] = {
923943
{ .compatible = "lltc,ltc7880" },
924944
{ .compatible = "lltc,ltm2987" },
925945
{ .compatible = "lltc,ltm4664" },
946+
{ .compatible = "lltc,ltm4673" },
926947
{ .compatible = "lltc,ltm4675" },
927948
{ .compatible = "lltc,ltm4676" },
928949
{ .compatible = "lltc,ltm4677" },

0 commit comments

Comments
 (0)