Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/hwmon/lltc,ltc2978.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
Expand Down Expand Up @@ -37,6 +37,8 @@
- lltc,ltm4677
- lltc,ltm4678
- lltc,ltm4680
- lltc,ltm4681
- lltc,ltm4682
- lltc,ltm4686
- lltc,ltm4700

Expand All @@ -60,6 +62,7 @@
* ltm4664 : vout0 - vout1
* ltm4675, ltm4676, ltm4677, ltm4678 : vout0 - vout1
* ltm4680, ltm4686 : vout0 - vout1
* ltm4681, ltm4682 : vout0 - vout1
* ltm4700 : vout0 - vout1

patternProperties:
Expand Down
29 changes: 23 additions & 6 deletions Documentation/hwmon/ltc2978.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.. SPDX-License-Identifier: GPL-2.0

Kernel driver ltc2978
Expand Down Expand Up @@ -207,6 +207,22 @@

Datasheet: https://www.analog.com/ltm4680

* Analog Devices LTM4681

Prefix: 'ltm4681'

Addresses scanned: -

Datasheet: https://www.analog.com/ltm4681

* Analog Devices LTM4682

Prefix: 'ltm4682'

Addresses scanned: -

Datasheet: https://www.analog.com/ltm4682

* Analog Devices LTM4686

Prefix: 'ltm4686'
Expand Down Expand Up @@ -317,7 +333,7 @@
- LTC2978: N=2-9
- LTC3880, LTC3882, LTC3884, LTC23886 LTC3887, LTC3889,
LTC7880, LTM4644, LTM4675, LTM4676, LTM4677, LTM4678,
LTM4680, LTM4700: N=2-3
LTM4680, LTM4682, LTM4681, LTM4700: N=2-3
- LTC3883: N=2
- LTC7841: N=2

Expand Down Expand Up @@ -359,8 +375,9 @@
reports the chip temperature.
- On LTC3880, LTC3882, LTC3886, LTC3887, LTC3889,
LTM4664, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
and LTM4700, temp1 and temp2 report external
temperatures, and temp3 reports the chip temperature.
LTM4681, LTM4682, and LTM4700, temp1 and temp2 report
external temperatures, and temp3 reports the chip
temperature.
- On LTC3883, temp1 reports an external temperature,
and temp2 reports the chip temperature.

Expand Down Expand Up @@ -416,7 +433,7 @@
- LTC2978: Not supported
- LTC3880, LTC3882, LTC3884, LTC3886, LTC3887, LTC3889,
LTM4664, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
LTM4700: N=1-2
LTM4681, LTM4682, LTM4700: N=1-2
- LTC3883: N=2

power[N]_input Measured output power.
Expand All @@ -425,7 +442,7 @@

LT7170, LT7171, LTC3880, LTC3883, LTC3884, LTC3886,
LTC3887, LTC3889, LTM4644, LTM4675, LTM4676, LTM4677,
LTM4678, LTM4680, and LTM4700 only.
LTM4678, LTM4680, LTM4681, LTM4682, and LTM4700 only.

curr1_input Measured input current.

Expand All @@ -450,7 +467,7 @@
- LTC2978: not supported
- LTC3880, LTC3882, LTC3884, LTC3886, LTC3887, LTC3889,
LTM4664, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
LTM4700: N=2-3
LTM4681, LTM4682, LTM4700: N=2-3
- LTC3883: N=2
- LTC7841: N=2

Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/pmbus/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ config SENSORS_LTC2978_REGULATOR
If you say yes here you get regulator support for Linear Technology
LT7170, LT7171, LTC3880, LTC3883, LTC3884, LTC3886, LTC3887, LTC3889,
LTC7841, LTC7880, LTM4644, LTM4675, LTM4676, LTM4677, LTM4678, LTM4680,
LTM4686, and LTM4700.
LTM4681, LTM4682, TM4686, and LTM4700.

config SENSORS_LTC3815
tristate "Linear Technologies LTC3815"
Expand Down
21 changes: 15 additions & 6 deletions drivers/hwmon/pmbus/ltc2978.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
lt7170, lt7171, ltc3880, ltc3882, ltc3883, ltc3884, ltc3886, ltc3887,
ltc3889, ltc7132, ltc7841, ltc7880,
/* Modules */
ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4686,
ltm4700,
ltm2987, ltm4664, ltm4675, ltm4676, ltm4677, ltm4678, ltm4680, ltm4681,
ltm4682, ltm4686, ltm4700,
};

/* Common for all chips */
Expand All @@ -46,12 +46,12 @@
#define LTC2974_MFR_IOUT_PEAK 0xd7
#define LTC2974_MFR_IOUT_MIN 0xd8

/* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, LTM4676, LTC7132 */
/* LTC3880, LTC3882, LTC3883, LTC3887, LTM4675, LTM4676, LTC7132, LTM4681 and LTM4682 */
#define LTC3880_MFR_IOUT_PEAK 0xd7
#define LTC3880_MFR_CLEAR_PEAKS 0xe3
#define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4
#define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4 /* Undocumented on LTM4682 */

Check warning on line 52 in drivers/hwmon/pmbus/ltc2978.c

View workflow job for this annotation

GitHub Actions / checks / checks

checkpatch: please, no space before tabs +#define LTC3880_MFR_TEMPERATURE2_PEAK^I0xf4 ^I/* Undocumented on LTM4682 */$

/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7841 and LTC7880 */
/* LTC3883, LTC3884, LTC3886, LTC3889, LTC7132, LTC7841, LTC7880, LTM4681, and LTM4682 */
#define LTC3883_MFR_IIN_PEAK 0xe1

/* LTC2975 only */
Expand Down Expand Up @@ -96,6 +96,8 @@
#define LTM4678_ID_REV1 0x4100
#define LTM4678_ID_REV2 0x4110
#define LTM4680_ID 0x4140
#define LTM4681_ID 0x4140
#define LTM4682_ID 0x4180
#define LTM4686_ID 0x4770
#define LTM4700_ID 0x4130

Expand Down Expand Up @@ -562,6 +564,8 @@
{"ltm4677", ltm4677},
{"ltm4678", ltm4678},
{"ltm4680", ltm4680},
{"ltm4681", ltm4681},
{"ltm4682", ltm4682},
{"ltm4686", ltm4686},
{"ltm4700", ltm4700},
{}
Expand Down Expand Up @@ -696,8 +700,10 @@
return ltm4677;
else if (chip_id == LTM4678_ID_REV1 || chip_id == LTM4678_ID_REV2)
return ltm4678;
else if (chip_id == LTM4680_ID)
else if (chip_id == LTM4680_ID || chip_id == LTM4681_ID)
return ltm4680;
else if (chip_id == LTM4682_ID)
return ltm4682;
else if (chip_id == LTM4686_ID)
return ltm4686;
else if (chip_id == LTM4700_ID)
Expand Down Expand Up @@ -880,6 +886,7 @@
case ltm4664:
case ltm4678:
case ltm4680:
case ltm4682:
case ltm4700:
data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING;
info->read_word_data = ltc3883_read_word_data;
Expand Down Expand Up @@ -969,6 +976,8 @@
{ .compatible = "lltc,ltm4677" },
{ .compatible = "lltc,ltm4678" },
{ .compatible = "lltc,ltm4680" },
{ .compatible = "lltc,ltm4681" },
{ .compatible = "lltc,ltm4682" },
{ .compatible = "lltc,ltm4686" },
{ .compatible = "lltc,ltm4700" },
{ }
Expand Down