Skip to content

Commit 9c1716b

Browse files
MarielTinacogroeck
authored andcommitted
hwmon: (pmbus/ltc2978) add support for ltc7841
Add support for LTC7841. The LTC7841 is a high performance PolyPhase® single output synchronous boost converter controller. Multiphase operation reduces input and output capacitor requirements and allows the use of smaller inductors than the single-phase equivalent. The relevant registers in the LTC7841 are similar to the LTC7880, only reduced by some amount. So it's just a matter of adding the chip id. The device also doesn't support polling, on top of the reduced register set, so a separate case for setting the chip info is added. Signed-off-by: Mariel Tinaco <[email protected]> Message-ID: <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent baf88c4 commit 9c1716b

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

drivers/hwmon/pmbus/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ config SENSORS_LTC2978_REGULATOR
224224
depends on SENSORS_LTC2978 && REGULATOR
225225
help
226226
If you say yes here you get regulator support for Linear Technology
227-
LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889, LTC7880,
228-
LTM4644, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680, LTM4686,
229-
and LTM4700.
227+
LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889, LTC7841,
228+
LTC7880, LTM4644, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
229+
LTM4686, and LTM4700.
230230

231231
config SENSORS_LTC3815
232232
tristate "Linear Technologies LTC3815"

drivers/hwmon/pmbus/ltc2978.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ enum chips {
2323
/* Managers */
2424
ltc2972, ltc2974, ltc2975, ltc2977, ltc2978, ltc2979, ltc2980,
2525
/* Controllers */
26-
ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132, ltc7880,
26+
ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887, ltc3889, ltc7132,
27+
ltc7841, ltc7880,
2728
/* Modules */
2829
ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
2930
ltm4700,
@@ -50,7 +51,7 @@ enum chips {
5051
#define LTC3880_MFR_CLEAR_PEAKS 0xe3
5152
#define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4
5253

53-
/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7880 */
54+
/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7841 and LTC7880 only */
5455
#define LTC3883_MFR_IIN_PEAK 0xe1
5556

5657
/* LTC2975 only */
@@ -80,6 +81,7 @@ enum chips {
8081
#define LTC3887_ID 0x4700
8182
#define LTC3889_ID 0x4900
8283
#define LTC7132_ID 0x4CE0
84+
#define LTC7841_ID 0x40D0
8385
#define LTC7880_ID 0x49E0
8486
#define LTM2987_ID_A 0x8010 /* A/B for two die IDs */
8587
#define LTM2987_ID_B 0x8020
@@ -548,6 +550,7 @@ static const struct i2c_device_id ltc2978_id[] = {
548550
{"ltc3887", ltc3887},
549551
{"ltc3889", ltc3889},
550552
{"ltc7132", ltc7132},
553+
{"ltc7841", ltc7841},
551554
{"ltc7880", ltc7880},
552555
{"ltm2987", ltm2987},
553556
{"ltm4664", ltm4664},
@@ -654,6 +657,8 @@ static int ltc2978_get_id(struct i2c_client *client)
654657
return ltc3889;
655658
else if (chip_id == LTC7132_ID)
656659
return ltc7132;
660+
else if (chip_id == LTC7841_ID)
661+
return ltc7841;
657662
else if (chip_id == LTC7880_ID)
658663
return ltc7880;
659664
else if (chip_id == LTM2987_ID_A || chip_id == LTM2987_ID_B)
@@ -854,6 +859,16 @@ static int ltc2978_probe(struct i2c_client *client)
854859
| PMBUS_HAVE_POUT
855860
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
856861
break;
862+
case ltc7841:
863+
data->features |= FEAT_CLEAR_PEAKS;
864+
info->read_word_data = ltc3883_read_word_data;
865+
info->pages = LTC3883_NUM_PAGES;
866+
info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN
867+
| PMBUS_HAVE_STATUS_INPUT
868+
| PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
869+
| PMBUS_HAVE_IOUT
870+
| PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP;
871+
break;
857872
default:
858873
return -ENODEV;
859874
}
@@ -907,6 +922,7 @@ static const struct of_device_id ltc2978_of_match[] = {
907922
{ .compatible = "lltc,ltc3887" },
908923
{ .compatible = "lltc,ltc3889" },
909924
{ .compatible = "lltc,ltc7132" },
925+
{ .compatible = "lltc,ltc7841" },
910926
{ .compatible = "lltc,ltc7880" },
911927
{ .compatible = "lltc,ltm2987" },
912928
{ .compatible = "lltc,ltm4664" },

0 commit comments

Comments
 (0)