summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@sonymobile.com>2015-10-12 17:49:52 -0700
committerMark Brown <broonie@kernel.org>2015-10-22 13:53:33 +0100
commita3e123c1c4dc97b52bfcf57213eefbee9443a9bd (patch)
treec712d289e3f2a2a778342d584ef864942f73449d /drivers/regulator
parent2c652a98ca556cca7749c184f0246315367bfad4 (diff)
downloadlinux-a3e123c1c4dc97b52bfcf57213eefbee9443a9bd.tar.gz
linux-a3e123c1c4dc97b52bfcf57213eefbee9443a9bd.tar.bz2
linux-a3e123c1c4dc97b52bfcf57213eefbee9443a9bd.zip
regulator: qcom-smd: Correct set_load() unit
The set_load() op deals with uA while the SMD packets used mA, so convert as we're building the packet. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/qcom_smd-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index b72c693e29ff..6fa0c7d13290 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -131,7 +131,7 @@ static int rpm_reg_set_load(struct regulator_dev *rdev, int load_uA)
req.key = cpu_to_le32(RPM_KEY_MA);
req.nbytes = cpu_to_le32(sizeof(u32));
- req.value = cpu_to_le32(load_uA);
+ req.value = cpu_to_le32(load_uA / 1000);
return rpm_reg_write_active(vreg, &req, sizeof(req));
}