hwmon: (pmbus) Add client driver for
Subsystems (2)
PATCH v2 15/15 hwmon: (pmbus) Add client driver for
PMBus client driver supporting National Semiconductor LM25066, LM5064, and LM5066.
Signed-off-by Guenter Roeck <[email protected]>
---
v2: Added documentation
Documentation/hwmon/lm25066 | 90 ++++++++++ drivers/hwmon/pmbus/Kconfig | 10 + drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/lm25066.c | 340 ++++++++++++++++++++++++++++++++++++++ drivers/hwmon/pmbus/pmbus.h | 1 + drivers/hwmon/pmbus/pmbus_core.c | 3 +- 6 files changed, 444 insertions(+), 1 deletions(-) create mode 100644 Documentation/hwmon/lm25066 create mode 100644 drivers/hwmon/pmbus/lm25066.c
Documentation/hwmon/lm25066 new file +89 -0
@@ -0,0 +1,90 @@ +Kernel driver max8688 +==========+ +Supported chips: + * National Semiconductor LM25066 + Prefix: 'lm25066' + Addresses scanned: - + Datasheets: + http://www.national.com/pf/LM/LM25066.html + http://www.national.com/pf/LM/LM25066A.html + * National Semiconductor LM5064 + Prefix: 'lm5064' + Addresses scanned: - + Datasheet: + http://www.national.com/pf/LM/LM5064.html + * National Semiconductor LM5066 + Prefix: 'lm5066' + Addresses scanned: - + Datasheet: + http://www.national.com/pf/LM/LM5066.html + +Author: Guenter Roeck <[email protected]> + + +Description +----------- + +This driver supports hardware montoring for National Semiconductor LM25066, +LM5064, and LM5064 Power Management, Monitoring, Control, and Protection ICs. + +The driver is a client driver to the core PMBus driver. Please see +Documentation/hwmon/pmbus for details on PMBus client drivers. + + +Usage Notes +----------- + +This driver does not auto-detect devices. You will have to instantiate the +devices explicitly. Please see Documentation/i2c/instantiating-devices for +details. + + +Platform data support +--------------------- + +The driver supports standard PMBus driver platform data. + + +Sysfs entries +------------- + +The following attributes are supported. Limits are read-write; all other +attributes are read-only. + +in1_label "vin" +in1_input Measured input voltage. +in1_average Average measured input voltage. +in1_min Minimum input Voltage. +in1_max Maximum input voltage. +in1_min_alarm Input voltage low alarm. +in1_max_alarm Input voltage high alarm. + +in2_label "vout1" +in2_input Measured output voltage. +in2_average Average measured output voltage. +in2_min Minimum output Voltage. +in2_min_alarm Output voltage low alarm. + +in3_label "vout2" +in3_input Measured voltage on vaux pin + +curr1_label "iin" +curr1_input Measured input current. +curr1_average Average measured input current. +curr1_max Maximum input current. +curr1_max_alarm Input current high alarm. + +power1_label "pin" +power1_input Measured input power. +power1_average Average measured input power. +power1_max Maximum input power limit. +power1_alarm Input power alarm +power1_input_highest Historical maximum power. +power1_reset_history Write any value to reset maximum power history. + +temp1_input Measured temperature. +temp1_max Maximum temperature. +temp1_crit Critical high temperature. +temp1_max_alarm Chip temperature high alarm. +temp1_crit_alarm Chip temperature critical high alarm.
drivers/hwmon/pmbus/Kconfig +10 -0
@@ -36,6 +36,16 @@ config SENSORS_ADM1275 This driver can also be built as a module. If so, the module will be called adm1275. +config SENSORS_LM25066 + tristate "National Semiconductor LM25066 and compatibles" + default n + help + If you say yes here you get hardware monitoring support for National + Semiconductor LM25066, LM5064, and LM5066. + + This driver can also be built as a module. If so, the module will + be called lm25066. + config SENSORS_MAX16064 tristate "Maxim MAX16064" default n
drivers/hwmon/pmbus/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_PMBUS) += pmbus_core.o obj-$(CONFIG_SENSORS_PMBUS) += pmbus.o obj-$(CONFIG_SENSORS_ADM1275) += adm1275.o +obj-$(CONFIG_SENSORS_LM25066) += lm25066.o obj-$(CONFIG_SENSORS_MAX16064) += max16064.o obj-$(CONFIG_SENSORS_MAX34440) += max34440.o obj-$(CONFIG_SENSORS_MAX8688) += max8688.o
drivers/hwmon/pmbus/lm25066.c new file +340 -0
340 lines not on this page · raw message
drivers/hwmon/pmbus/pmbus.h +1 -0
@@ -340,6 +340,7 @@ int pmbus_set_page(struct i2c_client *client, u8 page);int pmbus_read_word_data (struct i2c_client *client,u8 page,u8 reg);int pmbus_write_word_data (struct i2c_client *client,u8 page,u8 reg,u16 word);int pmbus_read_byte_data (struct i2c_client *client,int page,u8 reg); +int pmbus_write_byte (struct i2c_client *client,int page,u8 value);void pmbus_clear_faults (struct i2c_client *client);bool pmbus_check_byte_register (struct i2c_client *client,int page,int reg);bool pmbus_check_word_register (struct i2c_client *client,int page,int reg);
drivers/hwmon/pmbus/pmbus_core.c +2 -1
@@ -168,7 +168,7 @@ int pmbus_set_page(struct i2c_client *client, u8 page) }EXPORT_SYMBOL_GPL (pmbus_set_page); -static int pmbus_write_byte (struct i2c_client *client,int page,u8 value) +int pmbus_write_byte (struct i2c_client *client,int page,u8 value) {int rv;
@@ -180,6 +180,7 @@ static int pmbus_write_byte(struct i2c_client *client, int page, u8 value)return i2c_smbus_write_byte (client, value); } +EXPORT_SYMBOL_GPL (pmbus_write_byte);int pmbus_write_word_data (struct i2c_client *client,u8 page,u8 reg,u16 word) {
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors