aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/hwmon/ltc297841
-rw-r--r--drivers/hwmon/pmbus/ltc2978.c12
2 files changed, 36 insertions, 17 deletions
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978
index dc0d08c61305..6934936de2c7 100644
--- a/Documentation/hwmon/ltc2978
+++ b/Documentation/hwmon/ltc2978
@@ -6,6 +6,10 @@ Supported chips:
6 Prefix: 'ltc2974' 6 Prefix: 'ltc2974'
7 Addresses scanned: - 7 Addresses scanned: -
8 Datasheet: http://www.linear.com/product/ltc2974 8 Datasheet: http://www.linear.com/product/ltc2974
9 * Linear Technology LTC2977
10 Prefix: 'ltc2977'
11 Addresses scanned: -
12 Datasheet: http://www.linear.com/product/ltc2977
9 * Linear Technology LTC2978 13 * Linear Technology LTC2978
10 Prefix: 'ltc2978' 14 Prefix: 'ltc2978'
11 Addresses scanned: - 15 Addresses scanned: -
@@ -26,8 +30,9 @@ Description
26----------- 30-----------
27 31
28LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply 32LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply
29monitor. LTC3880 is a dual output poly-phase step-down DC/DC controller. LTC3883 33monitor. LTC2977 is a pin compatible replacement for LTC2978. LTC3880 is a dual
30is a single phase step-down DC/DC controller. 34output poly-phase step-down DC/DC controller. LTC3883 is a single phase
35step-down DC/DC controller.
31 36
32 37
33Usage Notes 38Usage Notes
@@ -49,21 +54,25 @@ Sysfs attributes
49in1_label "vin" 54in1_label "vin"
50in1_input Measured input voltage. 55in1_input Measured input voltage.
51in1_min Minimum input voltage. 56in1_min Minimum input voltage.
52in1_max Maximum input voltage. LTC2974 and LTC2978 only. 57in1_max Maximum input voltage.
53in1_lcrit Critical minimum input voltage. LTC2974 and LTC2978 58 LTC2974, LTC2977, and LTC2978 only.
54 only. 59in1_lcrit Critical minimum input voltage.
60 LTC2974, LTC2977, and LTC2978 only.
55in1_crit Critical maximum input voltage. 61in1_crit Critical maximum input voltage.
56in1_min_alarm Input voltage low alarm. 62in1_min_alarm Input voltage low alarm.
57in1_max_alarm Input voltage high alarm. LTC2974 and LTC2978 only. 63in1_max_alarm Input voltage high alarm.
58in1_lcrit_alarm Input voltage critical low alarm. LTC2974 and LTC2978 64 LTC2974, LTC2977, and LTC2978 only.
59 only. 65in1_lcrit_alarm Input voltage critical low alarm.
66 LTC2974, LTC2977, and LTC2978 only.
60in1_crit_alarm Input voltage critical high alarm. 67in1_crit_alarm Input voltage critical high alarm.
61in1_lowest Lowest input voltage. LTC2974 and LTC2978 only. 68in1_lowest Lowest input voltage.
69 LTC2974, LTC2977, and LTC2978 only.
62in1_highest Highest input voltage. 70in1_highest Highest input voltage.
63in1_reset_history Reset input voltage history. 71in1_reset_history Reset input voltage history.
64 72
65in[N]_label "vout[1-8]". 73in[N]_label "vout[1-8]".
66 LTC2974: N=2-5 74 LTC2974: N=2-5
75 LTC2977: N=2-9
67 LTC2978: N=2-9 76 LTC2978: N=2-9
68 LTC3880: N=2-3 77 LTC3880: N=2-3
69 LTC3883: N=2 78 LTC3883: N=2
@@ -83,21 +92,23 @@ in[N]_reset_history Reset output voltage history.
83temp[N]_input Measured temperature. 92temp[N]_input Measured temperature.
84 On LTC2974, temp[1-4] report external temperatures, 93 On LTC2974, temp[1-4] report external temperatures,
85 and temp5 reports the chip temperature. 94 and temp5 reports the chip temperature.
86 On LTC2978, only one temperature measurement is 95 On LTC2977 and LTC2978, only one temperature measurement
87 supported and reports the chip temperature. 96 is supported and reports the chip temperature.
88 On LTC3880, temp1 and temp2 report external 97 On LTC3880, temp1 and temp2 report external
89 temperatures, and temp3 reports the chip temperature. 98 temperatures, and temp3 reports the chip temperature.
90 On LTC3883, temp1 reports an external temperature, 99 On LTC3883, temp1 reports an external temperature,
91 and temp2 reports the chip temperature. 100 and temp2 reports the chip temperature.
92temp[N]_min Mimimum temperature. LTC2974 and LTC2978 only. 101temp[N]_min Mimimum temperature. LTC2974, LCT2977, and LTC2978 only.
93temp[N]_max Maximum temperature. 102temp[N]_max Maximum temperature.
94temp[N]_lcrit Critical low temperature. 103temp[N]_lcrit Critical low temperature.
95temp[N]_crit Critical high temperature. 104temp[N]_crit Critical high temperature.
96temp[N]_min_alarm Temperature low alarm. LTC2974 and LTC2978 only. 105temp[N]_min_alarm Temperature low alarm.
106 LTC2974, LTC2977, and LTC2978 only.
97temp[N]_max_alarm Temperature high alarm. 107temp[N]_max_alarm Temperature high alarm.
98temp[N]_lcrit_alarm Temperature critical low alarm. 108temp[N]_lcrit_alarm Temperature critical low alarm.
99temp[N]_crit_alarm Temperature critical high alarm. 109temp[N]_crit_alarm Temperature critical high alarm.
100temp[N]_lowest Lowest measured temperature. LTC2974 and LTC2978 only. 110temp[N]_lowest Lowest measured temperature.
111 LTC2974, LTC2977, and LTC2978 only.
101 Not supported for chip temperature sensor on LTC2974. 112 Not supported for chip temperature sensor on LTC2974.
102temp[N]_highest Highest measured temperature. Not supported for chip 113temp[N]_highest Highest measured temperature. Not supported for chip
103 temperature sensor on LTC2974. 114 temperature sensor on LTC2974.
@@ -109,6 +120,7 @@ power1_input Measured input power.
109 120
110power[N]_label "pout[1-4]". 121power[N]_label "pout[1-4]".
111 LTC2974: N=1-4 122 LTC2974: N=1-4
123 LTC2977: Not supported
112 LTC2978: Not supported 124 LTC2978: Not supported
113 LTC3880: N=1-2 125 LTC3880: N=1-2
114 LTC3883: N=2 126 LTC3883: N=2
@@ -123,6 +135,7 @@ curr1_reset_history Reset input current history. LTC3883 only.
123 135
124curr[N]_label "iout[1-4]". 136curr[N]_label "iout[1-4]".
125 LTC2974: N=1-4 137 LTC2974: N=1-4
138 LTC2977: not supported
126 LTC2978: not supported 139 LTC2978: not supported
127 LTC3880: N=2-3 140 LTC3880: N=2-3
128 LTC3883: N=2 141 LTC3883: N=2
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index 586a89ef9e0f..e05ff565ef61 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Hardware monitoring driver for LTC2974, LTC2978, LTC3880, and LTC3883 2 * Hardware monitoring driver for LTC2974, LTC2977, LTC2978, LTC3880,
3 * and LTC3883
3 * 4 *
4 * Copyright (c) 2011 Ericsson AB. 5 * Copyright (c) 2011 Ericsson AB.
5 * Copyright (c) 2013 Guenter Roeck 6 * Copyright (c) 2013 Guenter Roeck
@@ -27,7 +28,7 @@
27#include <linux/i2c.h> 28#include <linux/i2c.h>
28#include "pmbus.h" 29#include "pmbus.h"
29 30
30enum chips { ltc2974, ltc2978, ltc3880, ltc3883 }; 31enum chips { ltc2974, ltc2977, ltc2978, ltc3880, ltc3883 };
31 32
32/* Common for all chips */ 33/* Common for all chips */
33#define LTC2978_MFR_VOUT_PEAK 0xdd 34#define LTC2978_MFR_VOUT_PEAK 0xdd
@@ -35,7 +36,7 @@ enum chips { ltc2974, ltc2978, ltc3880, ltc3883 };
35#define LTC2978_MFR_TEMPERATURE_PEAK 0xdf 36#define LTC2978_MFR_TEMPERATURE_PEAK 0xdf
36#define LTC2978_MFR_SPECIAL_ID 0xe7 37#define LTC2978_MFR_SPECIAL_ID 0xe7
37 38
38/* LTC2974 and LTC2978 */ 39/* LTC2974, LCT2977, and LTC2978 */
39#define LTC2978_MFR_VOUT_MIN 0xfb 40#define LTC2978_MFR_VOUT_MIN 0xfb
40#define LTC2978_MFR_VIN_MIN 0xfc 41#define LTC2978_MFR_VIN_MIN 0xfc
41#define LTC2978_MFR_TEMPERATURE_MIN 0xfd 42#define LTC2978_MFR_TEMPERATURE_MIN 0xfd
@@ -53,6 +54,7 @@ enum chips { ltc2974, ltc2978, ltc3880, ltc3883 };
53#define LTC3883_MFR_IIN_PEAK 0xe1 54#define LTC3883_MFR_IIN_PEAK 0xe1
54 55
55#define LTC2974_ID 0x0212 56#define LTC2974_ID 0x0212
57#define LTC2977_ID 0x0130
56#define LTC2978_ID_REV1 0x0121 58#define LTC2978_ID_REV1 0x0121
57#define LTC2978_ID_REV2 0x0122 59#define LTC2978_ID_REV2 0x0122
58#define LTC3880_ID 0x4000 60#define LTC3880_ID 0x4000
@@ -363,6 +365,7 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,
363 365
364static const struct i2c_device_id ltc2978_id[] = { 366static const struct i2c_device_id ltc2978_id[] = {
365 {"ltc2974", ltc2974}, 367 {"ltc2974", ltc2974},
368 {"ltc2977", ltc2977},
366 {"ltc2978", ltc2978}, 369 {"ltc2978", ltc2978},
367 {"ltc3880", ltc3880}, 370 {"ltc3880", ltc3880},
368 {"ltc3883", ltc3883}, 371 {"ltc3883", ltc3883},
@@ -392,6 +395,8 @@ static int ltc2978_probe(struct i2c_client *client,
392 395
393 if (chip_id == LTC2974_ID) { 396 if (chip_id == LTC2974_ID) {
394 data->id = ltc2974; 397 data->id = ltc2974;
398 } else if (chip_id == LTC2977_ID) {
399 data->id = ltc2977;
395 } else if (chip_id == LTC2978_ID_REV1 || chip_id == LTC2978_ID_REV2) { 400 } else if (chip_id == LTC2978_ID_REV1 || chip_id == LTC2978_ID_REV2) {
396 data->id = ltc2978; 401 data->id = ltc2978;
397 } else if ((chip_id & LTC3880_ID_MASK) == LTC3880_ID) { 402 } else if ((chip_id & LTC3880_ID_MASK) == LTC3880_ID) {
@@ -438,6 +443,7 @@ static int ltc2978_probe(struct i2c_client *client,
438 | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT; 443 | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT;
439 } 444 }
440 break; 445 break;
446 case ltc2977:
441 case ltc2978: 447 case ltc2978:
442 info->read_word_data = ltc2978_read_word_data; 448 info->read_word_data = ltc2978_read_word_data;
443 info->pages = LTC2978_NUM_PAGES; 449 info->pages = LTC2978_NUM_PAGES;