Skip to content

Commit 7a8c68c

Browse files
cpackham-atlnzgroeck
authored andcommitted
hwmon: (pmbus/bpa-rs600) Don't use rated limits as warn limits
In the initial implementation a number of PMBUS_x_WARN_LIMITs were mapped to MFR fields. This was incorrect as these MFR limits reflect the rated limit as opposed to a limit which will generate warning. Instead return -ENXIO like we were already doing for other WARN_LIMITs. Subsequently these rated limits have been exposed generically as new fields in the sysfs ABI so the values are still available. Fixes: 15b2703 ("hwmon: (pmbus) Add driver for BluTek BPA-RS600") Signed-off-by: Chris Packham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 2aee7e6 commit 7a8c68c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

drivers/hwmon/pmbus/bpa-rs600.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@
1212
#include <linux/pmbus.h>
1313
#include "pmbus.h"
1414

15-
#define BPARS600_MFR_VIN_MIN 0xa0
16-
#define BPARS600_MFR_VIN_MAX 0xa1
17-
#define BPARS600_MFR_IIN_MAX 0xa2
18-
#define BPARS600_MFR_PIN_MAX 0xa3
19-
#define BPARS600_MFR_VOUT_MIN 0xa4
20-
#define BPARS600_MFR_VOUT_MAX 0xa5
21-
#define BPARS600_MFR_IOUT_MAX 0xa6
22-
#define BPARS600_MFR_POUT_MAX 0xa7
23-
2415
enum chips { bpa_rs600, bpd_rs600 };
2516

2617
static int bpa_rs600_read_byte_data(struct i2c_client *client, int page, int reg)
@@ -83,29 +74,13 @@ static int bpa_rs600_read_word_data(struct i2c_client *client, int page, int pha
8374

8475
switch (reg) {
8576
case PMBUS_VIN_UV_WARN_LIMIT:
86-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_VIN_MIN);
87-
break;
8877
case PMBUS_VIN_OV_WARN_LIMIT:
89-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_VIN_MAX);
90-
break;
9178
case PMBUS_VOUT_UV_WARN_LIMIT:
92-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_VOUT_MIN);
93-
break;
9479
case PMBUS_VOUT_OV_WARN_LIMIT:
95-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_VOUT_MAX);
96-
break;
9780
case PMBUS_IIN_OC_WARN_LIMIT:
98-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_IIN_MAX);
99-
break;
10081
case PMBUS_IOUT_OC_WARN_LIMIT:
101-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_IOUT_MAX);
102-
break;
10382
case PMBUS_PIN_OP_WARN_LIMIT:
104-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_PIN_MAX);
105-
break;
10683
case PMBUS_POUT_OP_WARN_LIMIT:
107-
ret = pmbus_read_word_data(client, 0, 0xff, BPARS600_MFR_POUT_MAX);
108-
break;
10984
case PMBUS_VIN_UV_FAULT_LIMIT:
11085
case PMBUS_VIN_OV_FAULT_LIMIT:
11186
case PMBUS_VOUT_UV_FAULT_LIMIT:

0 commit comments

Comments
 (0)