aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/hwmon/ltc297817
-rw-r--r--drivers/hwmon/pmbus/ltc2978.c20
2 files changed, 22 insertions, 15 deletions
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978
index a0546fc42273..686c078bb0e0 100644
--- a/Documentation/hwmon/ltc2978
+++ b/Documentation/hwmon/ltc2978
@@ -23,6 +23,10 @@ Supported chips:
23 Prefix: 'ltc3883' 23 Prefix: 'ltc3883'
24 Addresses scanned: - 24 Addresses scanned: -
25 Datasheet: http://www.linear.com/product/ltc3883 25 Datasheet: http://www.linear.com/product/ltc3883
26 * Linear Technology LTM4676
27 Prefix: 'ltm4676'
28 Addresses scanned: -
29 Datasheet: http://www.linear.com/product/ltm4676
26 30
27Author: Guenter Roeck <linux@roeck-us.net> 31Author: Guenter Roeck <linux@roeck-us.net>
28 32
@@ -33,7 +37,8 @@ Description
33LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply 37LTC2974 is a quad digital power supply manager. LTC2978 is an octal power supply
34monitor. LTC2977 is a pin compatible replacement for LTC2978. LTC3880 is a dual 38monitor. LTC2977 is a pin compatible replacement for LTC2978. LTC3880 is a dual
35output poly-phase step-down DC/DC controller. LTC3883 is a single phase 39output poly-phase step-down DC/DC controller. LTC3883 is a single phase
36step-down DC/DC controller. 40step-down DC/DC controller. LTM4676 is a dual 13A or single 26A uModule
41regulator.
37 42
38 43
39Usage Notes 44Usage Notes
@@ -75,7 +80,7 @@ in[N]_label "vout[1-8]".
75 LTC2974: N=2-5 80 LTC2974: N=2-5
76 LTC2977: N=2-9 81 LTC2977: N=2-9
77 LTC2978: N=2-9 82 LTC2978: N=2-9
78 LTC3880: N=2-3 83 LTC3880, LTM4676: N=2-3
79 LTC3883: N=2 84 LTC3883: N=2
80in[N]_input Measured output voltage. 85in[N]_input Measured output voltage.
81in[N]_min Minimum output voltage. 86in[N]_min Minimum output voltage.
@@ -95,7 +100,7 @@ temp[N]_input Measured temperature.
95 and temp5 reports the chip temperature. 100 and temp5 reports the chip temperature.
96 On LTC2977 and LTC2978, only one temperature measurement 101 On LTC2977 and LTC2978, only one temperature measurement
97 is supported and reports the chip temperature. 102 is supported and reports the chip temperature.
98 On LTC3880, temp1 and temp2 report external 103 On LTC3880 and LTM4676, temp1 and temp2 report external
99 temperatures, and temp3 reports the chip temperature. 104 temperatures, and temp3 reports the chip temperature.
100 On LTC3883, temp1 reports an external temperature, 105 On LTC3883, temp1 reports an external temperature,
101 and temp2 reports the chip temperature. 106 and temp2 reports the chip temperature.
@@ -123,11 +128,11 @@ power[N]_label "pout[1-4]".
123 LTC2974: N=1-4 128 LTC2974: N=1-4
124 LTC2977: Not supported 129 LTC2977: Not supported
125 LTC2978: Not supported 130 LTC2978: Not supported
126 LTC3880: N=1-2 131 LTC3880, LTM4676: N=1-2
127 LTC3883: N=2 132 LTC3883: N=2
128power[N]_input Measured output power. 133power[N]_input Measured output power.
129 134
130curr1_label "iin". LTC3880 and LTC3883 only. 135curr1_label "iin". LTC3880, LTC3883, and LTM4676 only.
131curr1_input Measured input current. 136curr1_input Measured input current.
132curr1_max Maximum input current. 137curr1_max Maximum input current.
133curr1_max_alarm Input current high alarm. 138curr1_max_alarm Input current high alarm.
@@ -138,7 +143,7 @@ curr[N]_label "iout[1-4]".
138 LTC2974: N=1-4 143 LTC2974: N=1-4
139 LTC2977: not supported 144 LTC2977: not supported
140 LTC2978: not supported 145 LTC2978: not supported
141 LTC3880: N=2-3 146 LTC3880, LTM4676: N=2-3
142 LTC3883: N=2 147 LTC3883: N=2
143curr[N]_input Measured output current. 148curr[N]_input Measured output current.
144curr[N]_max Maximum output current. 149curr[N]_max Maximum output current.
diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
index 629bfe0fe90a..e24ed521051a 100644
--- a/drivers/hwmon/pmbus/ltc2978.c
+++ b/drivers/hwmon/pmbus/ltc2978.c
@@ -1,9 +1,9 @@
1/* 1/*
2 * Hardware monitoring driver for LTC2974, LTC2977, LTC2978, LTC3880, 2 * Hardware monitoring driver for LTC2974, LTC2977, LTC2978, LTC3880,
3 * and LTC3883 3 * LTC3883, and LTM4676
4 * 4 *
5 * Copyright (c) 2011 Ericsson AB. 5 * Copyright (c) 2011 Ericsson AB.
6 * Copyright (c) 2013 Guenter Roeck 6 * Copyright (c) 2013, 2014 Guenter Roeck
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -14,10 +14,6 @@
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */ 17 */
22 18
23#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -28,7 +24,7 @@
28#include <linux/i2c.h> 24#include <linux/i2c.h>
29#include "pmbus.h" 25#include "pmbus.h"
30 26
31enum chips { ltc2974, ltc2977, ltc2978, ltc3880, ltc3883 }; 27enum chips { ltc2974, ltc2977, ltc2978, ltc3880, ltc3883, ltm4676 };
32 28
33/* Common for all chips */ 29/* Common for all chips */
34#define LTC2978_MFR_VOUT_PEAK 0xdd 30#define LTC2978_MFR_VOUT_PEAK 0xdd
@@ -45,7 +41,7 @@ enum chips { ltc2974, ltc2977, ltc2978, ltc3880, ltc3883 };
45#define LTC2974_MFR_IOUT_PEAK 0xd7 41#define LTC2974_MFR_IOUT_PEAK 0xd7
46#define LTC2974_MFR_IOUT_MIN 0xd8 42#define LTC2974_MFR_IOUT_MIN 0xd8
47 43
48/* LTC3880 and LTC3883 */ 44/* LTC3880, LTC3883, and LTM4676 */
49#define LTC3880_MFR_IOUT_PEAK 0xd7 45#define LTC3880_MFR_IOUT_PEAK 0xd7
50#define LTC3880_MFR_CLEAR_PEAKS 0xe3 46#define LTC3880_MFR_CLEAR_PEAKS 0xe3
51#define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4 47#define LTC3880_MFR_TEMPERATURE2_PEAK 0xf4
@@ -63,6 +59,8 @@ enum chips { ltc2974, ltc2977, ltc2978, ltc3880, ltc3883 };
63#define LTC3880_ID_MASK 0xff00 59#define LTC3880_ID_MASK 0xff00
64#define LTC3883_ID 0x4300 60#define LTC3883_ID 0x4300
65#define LTC3883_ID_MASK 0xff00 61#define LTC3883_ID_MASK 0xff00
62#define LTM4676_ID 0x4480 /* datasheet claims 0x440X */
63#define LTM4676_ID_MASK 0xfff0
66 64
67#define LTC2974_NUM_PAGES 4 65#define LTC2974_NUM_PAGES 4
68#define LTC2978_NUM_PAGES 8 66#define LTC2978_NUM_PAGES 8
@@ -371,6 +369,7 @@ static const struct i2c_device_id ltc2978_id[] = {
371 {"ltc2978", ltc2978}, 369 {"ltc2978", ltc2978},
372 {"ltc3880", ltc3880}, 370 {"ltc3880", ltc3880},
373 {"ltc3883", ltc3883}, 371 {"ltc3883", ltc3883},
372 {"ltm4676", ltm4676},
374 {} 373 {}
375}; 374};
376MODULE_DEVICE_TABLE(i2c, ltc2978_id); 375MODULE_DEVICE_TABLE(i2c, ltc2978_id);
@@ -406,6 +405,8 @@ static int ltc2978_probe(struct i2c_client *client,
406 data->id = ltc3880; 405 data->id = ltc3880;
407 } else if ((chip_id & LTC3883_ID_MASK) == LTC3883_ID) { 406 } else if ((chip_id & LTC3883_ID_MASK) == LTC3883_ID) {
408 data->id = ltc3883; 407 data->id = ltc3883;
408 } else if ((chip_id & LTM4676_ID_MASK) == LTM4676_ID) {
409 data->id = ltm4676;
409 } else { 410 } else {
410 dev_err(&client->dev, "Unsupported chip ID 0x%x\n", chip_id); 411 dev_err(&client->dev, "Unsupported chip ID 0x%x\n", chip_id);
411 return -ENODEV; 412 return -ENODEV;
@@ -459,6 +460,7 @@ static int ltc2978_probe(struct i2c_client *client,
459 } 460 }
460 break; 461 break;
461 case ltc3880: 462 case ltc3880:
463 case ltm4676:
462 info->read_word_data = ltc3880_read_word_data; 464 info->read_word_data = ltc3880_read_word_data;
463 info->pages = LTC3880_NUM_PAGES; 465 info->pages = LTC3880_NUM_PAGES;
464 info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN 466 info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN
@@ -501,5 +503,5 @@ static struct i2c_driver ltc2978_driver = {
501module_i2c_driver(ltc2978_driver); 503module_i2c_driver(ltc2978_driver);
502 504
503MODULE_AUTHOR("Guenter Roeck"); 505MODULE_AUTHOR("Guenter Roeck");
504MODULE_DESCRIPTION("PMBus driver for LTC2974, LTC2978, LTC3880, and LTC3883"); 506MODULE_DESCRIPTION("PMBus driver for LTC2974, LTC2978, LTC3880, LTC3883, and LTM4676");
505MODULE_LICENSE("GPL"); 507MODULE_LICENSE("GPL");