Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bjorn Andersson and committed by
Mark Brown
a3e123c1 2c652a98

+1 -1
+1 -1
drivers/regulator/qcom_smd-regulator.c
··· 131 131 132 132 req.key = cpu_to_le32(RPM_KEY_MA); 133 133 req.nbytes = cpu_to_le32(sizeof(u32)); 134 - req.value = cpu_to_le32(load_uA); 134 + req.value = cpu_to_le32(load_uA / 1000); 135 135 136 136 return rpm_reg_write_active(vreg, &req, sizeof(req)); 137 137 }