diff options
author | Eddie James <eajames@linux.ibm.com> | 2019-12-19 14:50:06 -0600 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2020-01-23 13:15:10 -0800 |
commit | 1952d79a0d2635c9130a48a598dd2f1eea70c45b (patch) | |
tree | e2adf68d0da4904cedd32a4fcb588e8976a28a0c /drivers/hwmon | |
parent | abe508b66d23cf2ed18c991c200b957e92f4bfbc (diff) | |
download | linux-1952d79a0d2635c9130a48a598dd2f1eea70c45b.tar.gz linux-1952d79a0d2635c9130a48a598dd2f1eea70c45b.tar.bz2 linux-1952d79a0d2635c9130a48a598dd2f1eea70c45b.zip |
hwmon: (pmbus/ibm-cffps) Add the VMON property for version 2
Version 2 of the PSU supports reading an auxiliary voltage. Use the
pmbus VMON property and associated virtual register to read it.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/1576788607-13567-3-git-send-email-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/pmbus/ibm-cffps.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/ibm-cffps.c b/drivers/hwmon/pmbus/ibm-cffps.c index a564be9b013c..b37faf1440d2 100644 --- a/drivers/hwmon/pmbus/ibm-cffps.c +++ b/drivers/hwmon/pmbus/ibm-cffps.c @@ -28,6 +28,7 @@ #define CFFPS1_FW_NUM_BYTES 4 #define CFFPS2_FW_NUM_WORDS 3 #define CFFPS_SYS_CONFIG_CMD 0xDA +#define CFFPS_12VCS_VOUT_CMD 0xDE #define CFFPS_INPUT_HISTORY_CMD 0xD6 #define CFFPS_INPUT_HISTORY_SIZE 100 @@ -350,6 +351,9 @@ static int ibm_cffps_read_word_data(struct i2c_client *client, int page, if (mfr & CFFPS_MFR_PS_KILL) rc |= PB_STATUS_OFF; break; + case PMBUS_VIRT_READ_VMON: + rc = pmbus_read_word_data(client, page, CFFPS_12VCS_VOUT_CMD); + break; default: rc = -ENODATA; break; @@ -453,7 +457,7 @@ static struct pmbus_driver_info ibm_cffps_info[] = { PMBUS_HAVE_TEMP2 | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_STATUS_TEMP | - PMBUS_HAVE_STATUS_FAN12, + PMBUS_HAVE_STATUS_FAN12 | PMBUS_HAVE_VMON, .func[1] = PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT | PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 | PMBUS_HAVE_TEMP3 | PMBUS_HAVE_STATUS_VOUT | PMBUS_HAVE_STATUS_IOUT, |