Fwd: [PATCH linux dev-4.13 4/5] pmbus (core): Use driver callbacks in pmbus_get_fan_rate()

George Keishing gkeishin at in.ibm.com
Wed Apr 4 14:01:38 AEST 2018


Test and verified working.

Tested-by: George Keishing <gkeishin at in.ibm.com>

Thanks and Regards,
   George Keishing
   IBM Systems &Technology Lab, Firmware Development,
“ There isn't enough time in a day to be lazy!!! .”





From:   Andrew Jeffery <andrew at aj.id.au>
To:     gkeishin at in.ibm.com
Date:   04/04/2018 09:25 AM
Subject:        Fwd: [PATCH linux dev-4.13 4/5] pmbus (core): Use driver 
callbacks in pmbus_get_fan_rate()





----- Original message -----
From: Andrew Jeffery <andrew at aj.id.au>
To: joel at jms.id.au
Cc: Andrew Jeffery <andrew at aj.id.au>, openbmc at lists.ozlabs.org
Subject: [PATCH linux dev-4.13 4/5] pmbus (core): Use driver callbacks in 
pmbus_get_fan_rate()
Date: Tue,  3 Apr 2018 23:56:54 +0930

The driver may have overridden the pmbus_read_byte_data() callback, so
make sure we use that to achieve expected behaviour.

This helps in the MAX31785 case where we may need to perform a one-shot
retry of transfers in the face of a failure.

Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
 drivers/hwmon/pmbus/pmbus_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hwmon/pmbus/pmbus_core.c 
b/drivers/hwmon/pmbus/pmbus_core.c
index ee1bf11c7fc6..d0ffa4b3fcbd 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -453,15 +453,15 @@ static int pmbus_get_fan_rate(struct i2c_client 
*client, int page, int id,
                                 return s->data;
                 }
 
-                config = pmbus_read_byte_data(client, page,
- pmbus_fan_config_registers[id]);
+                config = _pmbus_read_byte_data(client, page,
+ pmbus_fan_config_registers[id]);
                 if (config < 0)
                                 return config;
 
                 have_rpm = !!(config & pmbus_fan_rpm_mask[id]);
                 if (want_rpm == have_rpm)
-                                return pmbus_read_word_data(client, page,
-      pmbus_fan_command_registers[id]);
+                                return _pmbus_read_word_data(client, 
page,
+       pmbus_fan_command_registers[id]);
 
                 /* Can't sensibly map between RPM and PWM, just return 
zero */
                 return 0;
-- 
2.14.1





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20180404/b6ed0b62/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 7547 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20180404/b6ed0b62/attachment-0001.jpe>


More information about the openbmc mailing list