<span style=" font-size:10pt;font-family:sans-serif">Test and verified
working.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Tested-by: George
Keishing <gkeishin@in.ibm.com></span><br><br><span style=" font-size:10pt;color:blue;font-family:sans-serif"><b>Thanks
and Regards,</b></span><br><span style=" font-size:10pt;color:blue;font-family:sans-serif">
George Keishing</span><br><span style=" font-size:10pt;color:blue;font-family:sans-serif">
IBM Systems &Technology Lab, Firmware Development,</span><br><span style=" font-size:10pt;font-family:sans-serif"><i>“</i></span><span style=" font-size:12pt">There isn't enough time in a day to be lazy!!! </span><span style=" font-size:9pt;font-family:sans-serif">.”</span><br><img src=cid:_2_0B0423740B0421080016198865258265 style="border:0px solid;"><br><br><br><br><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">From:
</span><span style=" font-size:9pt;font-family:sans-serif">Andrew
Jeffery <andrew@aj.id.au></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">To:
</span><span style=" font-size:9pt;font-family:sans-serif">gkeishin@in.ibm.com</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Date:
</span><span style=" font-size:9pt;font-family:sans-serif">04/04/2018
09:25 AM</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Subject:
</span><span style=" font-size:9pt;font-family:sans-serif">Fwd:
[PATCH linux dev-4.13 4/5] pmbus (core): Use driver callbacks in pmbus_get_fan_rate()</span><br><hr noshade><br><br><br><tt><span style=" font-size:10pt"><br><br>----- Original message -----<br>From: Andrew Jeffery <andrew@aj.id.au><br>To: joel@jms.id.au<br>Cc: Andrew Jeffery <andrew@aj.id.au>, openbmc@lists.ozlabs.org<br>Subject: [PATCH linux dev-4.13 4/5] pmbus (core): Use driver callbacks
in pmbus_get_fan_rate()<br>Date: Tue, 3 Apr 2018 23:56:54 +0930<br><br>The driver may have overridden the pmbus_read_byte_data() callback, so<br>make sure we use that to achieve expected behaviour.<br><br>This helps in the MAX31785 case where we may need to perform a one-shot<br>retry of transfers in the face of a failure.<br><br>Signed-off-by: Andrew Jeffery <andrew@aj.id.au><br>---<br> drivers/hwmon/pmbus/pmbus_core.c | 8 ++++----<br> 1 file changed, 4 insertions(+), 4 deletions(-)<br><br>diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c<br>index ee1bf11c7fc6..d0ffa4b3fcbd 100644<br>--- a/drivers/hwmon/pmbus/pmbus_core.c<br>+++ b/drivers/hwmon/pmbus/pmbus_core.c<br>@@ -453,15 +453,15 @@ static int pmbus_get_fan_rate(struct i2c_client *client,
int page, int id,<br>
return s->data;<br> }<br> <br>-
config = pmbus_read_byte_data(client, page,<br>-
pmbus_fan_config_registers[id]);<br>+
config = _pmbus_read_byte_data(client, page,<br>+
pmbus_fan_config_registers[id]);<br> if
(config < 0)<br>
return config;<br> <br> have_rpm
= !!(config & pmbus_fan_rpm_mask[id]);<br> if
(want_rpm == have_rpm)<br>-
return
pmbus_read_word_data(client, page,<br>-
pmbus_fan_command_registers[id]);<br>+
return
_pmbus_read_word_data(client, page,<br>+
pmbus_fan_command_registers[id]);<br> <br> /*
Can't sensibly map between RPM and PWM, just return zero */<br> return
0;<br>-- <br>2.14.1<br><br></span></tt><br><br><BR>