aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-06-08 14:15:23 -0400
committerGuenter Roeck <linux@roeck-us.net>2015-08-09 16:44:27 -0400
commit1f61cab8a729e00af77b51b44c3a8dc8ef3b3eb9 (patch)
treee50a28f26f95e50c4f50fdfbe81d69be9bce6886
parent068c227056b9223fea1a759e08db2558d5cbb5ad (diff)
hwmon: (pmbus) Add support for MAX20751
MAX20751 is a multiphase power controller with internal buck converter. It uses VR12.0 to report the output voltage. This requires an explicit driver, since the VR version can not be auto-detected. The chip supports a manufacturer specific command to fine-tune the output voltage. This command is not currently supported. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--Documentation/hwmon/max2075177
-rw-r--r--MAINTAINERS7
-rw-r--r--drivers/hwmon/pmbus/Kconfig10
-rw-r--r--drivers/hwmon/pmbus/Makefile1
-rw-r--r--drivers/hwmon/pmbus/max20751.c64
5 files changed, 159 insertions, 0 deletions
diff --git a/Documentation/hwmon/max20751 b/Documentation/hwmon/max20751
new file mode 100644
index 000000000000..f9fa25ebb521
--- /dev/null
+++ b/Documentation/hwmon/max20751
@@ -0,0 +1,77 @@
1Kernel driver max20751
2======================
3
4Supported chips:
5 * maxim MAX20751
6 Prefix: 'max20751'
7 Addresses scanned: -
8 Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX20751.pdf
9 Application note: http://pdfserv.maximintegrated.com/en/an/AN5941.pdf
10
11Author: Guenter Roeck <linux@roeck-us.net>
12
13
14Description
15-----------
16
17This driver supports MAX20751 Multiphase Master with PMBus Interface
18and Internal Buck Converter.
19
20The driver is a client driver to the core PMBus driver.
21Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
22
23
24Usage Notes
25-----------
26
27This driver does not auto-detect devices. You will have to instantiate the
28devices explicitly. Please see Documentation/i2c/instantiating-devices for
29details.
30
31
32Platform data support
33---------------------
34
35The driver supports standard PMBus driver platform data.
36
37
38Sysfs entries
39-------------
40
41The following attributes are supported.
42
43in1_label "vin1"
44in1_input Measured voltage.
45in1_min Minimum input voltage.
46in1_max Maximum input voltage.
47in1_lcrit Critical minimum input voltage.
48in1_crit Critical maximum input voltage.
49in1_min_alarm Input voltage low alarm.
50in1_lcrit_alarm Input voltage critical low alarm.
51in1_min_alarm Input voltage low alarm.
52in1_max_alarm Input voltage high alarm.
53
54in2_label "vout1"
55in2_input Measured voltage.
56in2_min Minimum output voltage.
57in2_max Maximum output voltage.
58in2_lcrit Critical minimum output voltage.
59in2_crit Critical maximum output voltage.
60in2_min_alarm Output voltage low alarm.
61in2_lcrit_alarm Output voltage critical low alarm.
62in2_min_alarm Output voltage low alarm.
63in2_max_alarm Output voltage high alarm.
64
65curr1_input Measured output current.
66curr1_label "iout1"
67curr1_max Maximum output current.
68curr1_alarm Current high alarm.
69
70temp1_input Measured temperature.
71temp1_max Maximum temperature.
72temp1_crit Critical high temperature.
73temp1_max_alarm Chip temperature high alarm.
74temp1_crit_alarm Chip temperature critical high alarm.
75
76power1_input Output power.
77power1_label "pout1"
diff --git a/MAINTAINERS b/MAINTAINERS
index a9ae6c105520..6a406b607eeb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6539,6 +6539,13 @@ S: Maintained
6539F: Documentation/hwmon/max16065 6539F: Documentation/hwmon/max16065
6540F: drivers/hwmon/max16065.c 6540F: drivers/hwmon/max16065.c
6541 6541
6542MAX20751 HARDWARE MONITOR DRIVER
6543M: Guenter Roeck <linux@roeck-us.net>
6544L: lm-sensors@lm-sensors.org
6545S: Maintained
6546F: Documentation/hwmon/max20751
6547F: drivers/hwmon/max20751.c
6548
6542MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER 6549MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
6543M: "Hans J. Koch" <hjk@hansjkoch.de> 6550M: "Hans J. Koch" <hjk@hansjkoch.de>
6544L: lm-sensors@lm-sensors.org 6551L: lm-sensors@lm-sensors.org
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index 67901cb08f77..6e1e6fe434f7 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -73,6 +73,16 @@ config SENSORS_MAX16064
73 This driver can also be built as a module. If so, the module will 73 This driver can also be built as a module. If so, the module will
74 be called max16064. 74 be called max16064.
75 75
76config SENSORS_MAX20751
77 tristate "Maxim MAX20751"
78 default n
79 help
80 If you say yes here you get hardware monitoring support for Maxim
81 MAX20751.
82
83 This driver can also be built as a module. If so, the module will
84 be called max20751.
85
76config SENSORS_MAX34440 86config SENSORS_MAX34440
77 tristate "Maxim MAX34440 and compatibles" 87 tristate "Maxim MAX34440 and compatibles"
78 default n 88 default n
diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
index 1454293e985c..bce046d37f02 100644
--- a/drivers/hwmon/pmbus/Makefile
+++ b/drivers/hwmon/pmbus/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_SENSORS_ADM1275) += adm1275.o
8obj-$(CONFIG_SENSORS_LM25066) += lm25066.o 8obj-$(CONFIG_SENSORS_LM25066) += lm25066.o
9obj-$(CONFIG_SENSORS_LTC2978) += ltc2978.o 9obj-$(CONFIG_SENSORS_LTC2978) += ltc2978.o
10obj-$(CONFIG_SENSORS_MAX16064) += max16064.o 10obj-$(CONFIG_SENSORS_MAX16064) += max16064.o
11obj-$(CONFIG_SENSORS_MAX20751) += max20751.o
11obj-$(CONFIG_SENSORS_MAX34440) += max34440.o 12obj-$(CONFIG_SENSORS_MAX34440) += max34440.o
12obj-$(CONFIG_SENSORS_MAX8688) += max8688.o 13obj-$(CONFIG_SENSORS_MAX8688) += max8688.o
13obj-$(CONFIG_SENSORS_TPS40422) += tps40422.o 14obj-$(CONFIG_SENSORS_TPS40422) += tps40422.o
diff --git a/drivers/hwmon/pmbus/max20751.c b/drivers/hwmon/pmbus/max20751.c
new file mode 100644
index 000000000000..ab74aeae8cf2
--- /dev/null
+++ b/drivers/hwmon/pmbus/max20751.c
@@ -0,0 +1,64 @@
1/*
2 * Hardware monitoring driver for Maxim MAX20751
3 *
4 * Copyright (c) 2015 Guenter Roeck
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/kernel.h>
18#include <linux/module.h>
19#include <linux/init.h>
20#include <linux/err.h>
21#include <linux/i2c.h>
22#include "pmbus.h"
23
24static struct pmbus_driver_info max20751_info = {
25 .pages = 1,
26 .format[PSC_VOLTAGE_IN] = linear,
27 .format[PSC_VOLTAGE_OUT] = vid,
28 .vrm_version = vr12,
29 .format[PSC_TEMPERATURE] = linear,
30 .format[PSC_CURRENT_OUT] = linear,
31 .format[PSC_POWER] = linear,
32 .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
33 PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
34 PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP |
35 PMBUS_HAVE_POUT,
36};
37
38static int max20751_probe(struct i2c_client *client,
39 const struct i2c_device_id *id)
40{
41 return pmbus_do_probe(client, id, &max20751_info);
42}
43
44static const struct i2c_device_id max20751_id[] = {
45 {"max20751", 0},
46 {}
47};
48
49MODULE_DEVICE_TABLE(i2c, max20751_id);
50
51static struct i2c_driver max20751_driver = {
52 .driver = {
53 .name = "max20751",
54 },
55 .probe = max20751_probe,
56 .remove = pmbus_do_remove,
57 .id_table = max20751_id,
58};
59
60module_i2c_driver(max20751_driver);
61
62MODULE_AUTHOR("Guenter Roeck <linux@roeck-us.net>");
63MODULE_DESCRIPTION("PMBus driver for Maxim MAX20751");
64MODULE_LICENSE("GPL");