summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-04-03 17:26:54 +0300
committerJoel Stanley <joel@jms.id.au>2020-08-06 03:30:29 +0300
commit7d116119050ad6d8a93dd910583dd0f8ca6c8ebb (patch)
tree8426ffb480f673372f2b30ae29ad88159e6446de /drivers
parent3523bcc116e011692a4f51c64cedac7176e64a2e (diff)
downloadlinux-7d116119050ad6d8a93dd910583dd0f8ca6c8ebb.tar.xz
pmbus (core): Use driver callbacks in pmbus_get_fan_rate()
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. OpenBMC-Staging-Count: 12 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Eddie James <eajames@linux.vnet.ibm.com> Tested-by: George Keishing <gkeishin@in.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 2191575a448b..8c7b6014c7af 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -451,15 +451,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, 0xff,
- pmbus_fan_command_registers[id]);
+ return _pmbus_read_word_data(client, page, 0xff,
+ pmbus_fan_command_registers[id]);
/* Can't sensibly map between RPM and PWM, just return zero */
return 0;