hwmon: (pmbus/max8688) Accept negative page register values
Subsystems (2)
Guenter Roeck
maintainerPATCH 1/3 hwmon: (pmbus/max8688) Accept negative page register values
A negative page register value means that no page needs to be selected. This is used by status register evaluations and needs to be accepted.
Fixes da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver")
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/hwmon/pmbus/max8688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/pmbus/max8688.c +1 -1
@@ -45,7 +45,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg) {int ret; -if (page) +if (page >0 )return -ENXIO ;switch (reg) {
Signature · 1 line
2.7.4
Guenter Roeck
maintainerPATCH 2/3 hwmon: (pmbus/adm1275) Accept negative page register values
A negative page register value means that no page needs to be selected. This is used by status register read operations and needs to be accepted. The failure to do so so results in missed status and limit registers.
Fixes da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver")
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/hwmon/pmbus/adm1275.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/pmbus/adm1275.c +2 -2
@@ -154,7 +154,7 @@ static int adm1275_read_word_data(struct i2c_client *client, int page, int reg)const struct adm1275_data *data =to_adm1275_data (info);int ret =0 ; -if (page) +if (page >0 )return -ENXIO ;switch (reg) {
@@ -240,7 +240,7 @@ static int adm1275_write_word_data(struct i2c_client *client, int page, int reg,const struct adm1275_data *data =to_adm1275_data (info);int ret; -if (page) +if (page >0 )return -ENXIO ;switch (reg) {
Signature · 1 line
2.7.4
Guenter Roeck
maintainerPATCH 3/3 hwmon: (pmbus/adm1275) Add support for ADM1272
In reply to Guenter RoeckThe chip is quite similar to other chips in the series, but as usual it comes with its own quirks.
Signed-off-by Guenter Roeck <[email protected]>
--- Documentation/hwmon/adm1275 | 20 +++++++------ drivers/hwmon/pmbus/Kconfig | 4 +-- drivers/hwmon/pmbus/adm1275.c | 67 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 80 insertions(+), 11 deletions(-)
Documentation/hwmon/adm1275 +12 -8
@@ -6,6 +6,10 @@ Supported chips: Prefix: 'adm1075' Addresses scanned: - Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1075.pdf + * Analog Devices ADM1272 + Prefix: 'adm1272' + Addresses scanned: - + Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1272.pdf * Analog Devices ADM1275 Prefix: 'adm1275' Addresses scanned: -
@@ -29,11 +33,11 @@ Author: Guenter Roeck <[email protected]> Description ----------- -This driver supports hardware monitoring for Analog Devices ADM1075, ADM1275, -ADM1276, ADM1278, ADM1293, and ADM1294 Hot-Swap Controller and Digital -Power Monitors. +This driver supports hardware monitoring for Analog Devices ADM1075, ADM1272, +ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 Hot-Swap Controller and +Digital Power Monitors. -ADM1075, ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 are hot-swap +ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 are hot-swap controllers that allow a circuit board to be removed from or inserted into a live backplane. They also feature current and voltage readback via an integrated 12 bit analog-to-digital converter (ADC), accessed using a
@@ -100,11 +104,10 @@ power1_input_lowest Lowest observed input power. ADM1293 and ADM1294 only. power1_input_highest Highest observed input power. power1_reset_history Write any value to reset history. - Power attributes are supported on ADM1075, ADM1276, - ADM1293, and ADM1294. + Power attributes are supported on ADM1075, ADM1272, + ADM1276, ADM1293, and ADM1294. temp1_input Chip temperature. - Temperature attributes are only available on ADM1278. temp1_max Maximum chip temperature. temp1_max_alarm Temperature alarm. temp1_crit Critical chip temperature.
@@ -112,4 +115,5 @@ temp1_crit_alarm Critical temperature high alarm. temp1_highest Highest observed temperature. temp1_reset_history Write any value to reset history. - Temperature attributes are supported on ADM1278. + Temperature attributes are supported on ADM1272 and + ADM1278.
drivers/hwmon/pmbus/Kconfig +2 -2
@@ -31,8 +31,8 @@ config SENSORS_ADM1275 default n help If you say yes here you get hardware monitoring support for Analog - Devices ADM1075, ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 - Hot-Swap Controller and Digital Power Monitors. + Devices ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1293, + and ADM1294 Hot-Swap Controller and Digital Power Monitors. This driver can also be built as a module. If so, the module will be called adm1275.
drivers/hwmon/pmbus/adm1275.c +66 -1
103 lines not on this page · raw message
Signature · 1 line
2.7.4