hwmon: (pmbus/ibm-cffps) Do not swap max_power_out
PATCH 1/1 hwmon: (pmbus/ibm-cffps) Do not swap max_power_out
The bytes for max_power_out from the ibm-cffps devices do not need to be swapped.
--- drivers/hwmon/pmbus/ibm-cffps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/pmbus/ibm-cffps.c +1 -1
@@ -171,7 +171,7 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char __user *buf, cmd =CFFPS_SN_CMD ;break ;case CFFPS_DEBUGFS_MAX_POWER_OUT : - rc =i2c_smbus_read_word_swapped (psu->client, + rc =i2c_smbus_read_word_data (psu->client,CFFPS_MAX_POWER_OUT_CMD );if (rc <0 )return rc;
Signature · 1 line
2.25.1
Guenter Roeck
maintainerQuoted 4 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need to be swapped.Signed-off-by Brandon Wyman <[email protected]>
Eddie, can you confirm this ?
Thanks,
Guenter
Quoted 20 lines
--- drivers/hwmon/pmbus/ibm-cffps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/ibm-cffps.c +1
-1@@ -171,7 +171,7 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char __user *buf, cmd =CFFPS_SN_CMD ;break ;case CFFPS_DEBUGFS_MAX_POWER_OUT : - rc =i2c_smbus_read_word_swapped (psu->client, + rc =i2c_smbus_read_word_data (psu->client,CFFPS_MAX_POWER_OUT_CMD );if (rc <0 )return rc;Signature · 1 line
2.25.1
Quoted 8 lines · Guenter Roeck
Quoted 5 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need to be
swapped.Signed-off-by Brandon Wyman <[email protected]>Eddie, can you confirm this ?
This can't be true for all the power supplies supported by this driver, no. I think we need to check the version first. Brandon, I tested this on witherspoon (which is psu version 1) and get 3148 watts. If it's not swapped, that would be 19468 watts...
Thanks,
Eddie
Quoted 27 lines
Thanks,
GuenterQuoted 23 lines
--- drivers/hwmon/pmbus/ibm-cffps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/ibm-cffps.c +1
-1@@ -171,7 +171,7 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char__user *buf, cmd =CFFPS_SN_CMD ;break ;case CFFPS_DEBUGFS_MAX_POWER_OUT : - rc =i2c_smbus_read_word_swapped (psu->client, + rc =i2c_smbus_read_word_data (psu->client,CFFPS_MAX_POWER_OUT_CM D);drivers/hwmon/pmbus/ibm-cffps.c +0
-0if (rc <0 )return rc;Signature · 1 line
2.25.1
Guenter Roeck
maintainerQuoted 6 lines · Eddie James
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need to be
swapped.
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Brandon Wyman <[email protected]>Eddie, can you confirm this ?
This can't be true for all the power supplies supported by this driver, no. I think we need to check the version first. Brandon, I tested this on witherspoon (which is psu version 1) and get 3148 watts. If it's not swapped, that would be 19468 watts...
Hmm. Eddie, can you also have a look at commit 9fed8fa99334 ("hwmon:
(pmbus/ibm-cffps) Fix write bits for LED control") ?
We need to make sure that it doesn't mess up some versions of this PS.
Thanks,
Guenter
Quoted 21 lines · Guenter Roeck
Quoted 11 lines · Eddie James
Quoted 9 lines · Guenter Roeck
Quoted 6 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need
to be
swapped.Signed-off-by Brandon Wyman <[email protected]>Eddie, can you confirm this ?
Quoted 8 lines
This can't be true for all the power supplies supported by this driver,
no. I think we need to check the version first. Brandon, I tested this
on witherspoon (which is psu version 1) and get 3148 watts. If it's not
swapped, that would be 19468 watts...
Quoted 4 lines
Hmm. Eddie, can you also have a look at commit
9fed8fa99334("hwmon:
(pmbus/ibm-cffps) Fix write bits for LED control") ?
We need to make sure that it doesn't mess up some versions of this PS.
That one looks correct to me. I believe older PSUs didn't enforce this so I didn't catch it, but I do see that the older specifications mention setting bit 6 to "allow write".
Thanks,
Eddie
Quoted 3 lines
Thanks,
Guenter
Guenter Roeck
maintainerQuoted 22 lines · Eddie James
Quoted 21 lines · Guenter Roeck
Quoted 19 lines · Eddie James
Quoted 9 lines · Guenter Roeck
Quoted 6 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need
to be
swapped.Signed-off-by Brandon Wyman <[email protected]>Eddie, can you confirm this ?
This can't be true for all the power supplies supported by this driver,
no. I think we need to check the version first. Brandon, I tested this
on witherspoon (which is psu version 1) and get 3148 watts. If it's not
swapped, that would be 19468 watts...
Quoted 9 lines
Quoted 4 lines
Hmm. Eddie, can you also have a look at commit
9fed8fa99334("hwmon:
(pmbus/ibm-cffps) Fix write bits for LED control") ?
We need to make sure that it doesn't mess up some versions of this PS.That one looks correct to me. I believe older PSUs didn't enforce this so I didn't catch it, but I do see that the older specifications mention setting bit 6 to "allow write".
Great, thanks a lot for checking.
Guenter
Quoted 7 lines · Eddie James
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need to be
swapped.Signed-off-by Brandon Wyman <[email protected]>
Quoted 8 lines
Quoted 1 line
Eddie, can you confirm this ?
This can't be true for all the power supplies supported by this driver, no. I think we need to check the version first. Brandon, I tested this on witherspoon (which is psu version 1) and get 3148 watts. If it's not swapped, that would be 19468 watts...
Thanks,
Eddie
I had tested this on a variety of systems with a variety of different power supplies, but I did *NOT* test this on the Witherspoon power supplies.
This apparently requires a bit more thought to figure out how to handle the other types and also not get Witherspoon wrong.
Thanks for checking Eddie.
Quoted 26 lines
Quoted 26 lines
Thanks,
GuenterQuoted 23 lines
--- drivers/hwmon/pmbus/ibm-cffps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/ibm-cffps.c +1
-1@@ -171,7 +171,7 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char__user *buf, cmd =CFFPS_SN_CMD ;break ;case CFFPS_DEBUGFS_MAX_POWER_OUT : - rc =i2c_smbus_read_word_swapped (psu->client, + rc =i2c_smbus_read_word_data (psu->client,CFFPS_MAX_POWER_OUT_CM D);if (rc < 0)
return rc;Signature · 1 line
2.25.1
Guenter Roeck
maintainerQuoted 15 lines · Brandon Wyman
Quoted 13 lines · Eddie James
Quoted 7 lines · Guenter Roeck
Quoted 5 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need to be
swapped.Signed-off-by Brandon Wyman <[email protected]>Eddie, can you confirm this ?
This can't be true for all the power supplies supported by this driver, no. I think we need to check the version first. Brandon, I tested this on witherspoon (which is psu version 1) and get 3148 watts. If it's not swapped, that would be 19468 watts...
Quoted 6 lines
Quoted 2 lines
Thanks,
EddieI had tested this on a variety of systems with a variety of different power supplies, but I did *NOT* test this on the Witherspoon power supplies.
This apparently requires a bit more thought to figure out how to handle the other types and also not get Witherspoon wrong.
Is the specification for those power supplies available in public ?
Thanks,
Guenter
Quoted 28 lines
Thanks for checking Eddie.
Quoted 26 lines
Quoted 26 lines
Thanks,
GuenterQuoted 23 lines
---
drivers/hwmon/pmbus/ibm-cffps.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/ibm-cffps.c +0
-0@@ -171,7 +171,7 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char__user *buf, cmd = CFFPS_SN_CMD; break;case
CFFPS_DEBUGFS_MAX_POWER_OUT:
- rc = i2c_smbus_read_word_swapped(psu->client, + rc =i2c_smbus_read_word_data(psu->client, CFFPS_MAX_POWER_OUT_CM D);
if (rc < 0)
return rc;Signature · 1 line
2.25.1
Quoted 20 lines · Guenter Roeck
Quoted 19 lines · Brandon Wyman
Quoted 7 lines · Eddie James
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Brandon Wyman
The bytes for
max_power_outfrom the ibm-cffps devices do not need to be
swapped.Signed-off-by Brandon Wyman <[email protected]>Quoted 8 lines
Quoted 1 line
Eddie, can you confirm this ?
This can't be true for all the power supplies supported by this driver, no. I think we need to check the version first. Brandon, I tested this on witherspoon (which is psu version 1) and get 3148 watts. If it's not swapped, that would be 19468 watts...
Thanks,
EddieI had tested this on a variety of systems with a variety of different power supplies, but I did *NOT* test this on the Witherspoon power supplies.
Quoted 8 lines
Quoted 2 lines
This apparently requires a bit more thought to figure out how to handle the other types and also not get Witherspoon wrong.
Is the specification for those power supplies available in public ?
Thanks,
Guenter
No, unfortunately those power supply specifications are not available to the public.
Sorry,
Brandon
Quoted 29 lines
Quoted 28 lines
Thanks for checking Eddie.
Quoted 26 lines
Quoted 26 lines
Thanks,
GuenterQuoted 23 lines
---
drivers/hwmon/pmbus/ibm-cffps.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/pmbus/ibm-cffps.c +0
-0@@ -171,7 +171,7 @@ static ssize_t ibm_cffps_debugfs_read(struct file *file, char__user *buf, cmd = CFFPS_SN_CMD; break;case
CFFPS_DEBUGFS_MAX_POWER_OUT:
- rc = i2c_smbus_read_word_swapped(psu->client, + rc =i2c_smbus_read_word_data(psu->client, CFFPS_MAX_POWER_OUT_CM D);
if (rc < 0)
return rc;Signature · 1 line
2.25.1