summaryrefslogtreecommitdiff
path: root/include/linux/earlycpio.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2017-11-02 08:06:19 +0300
committerMark Brown <broonie@kernel.org>2017-11-02 19:11:28 +0300
commitab953b9db3a1169fbc675c8de3d2dab919ce3211 (patch)
tree2b06e35e9a5db2080ca66f357f058c6e54ad5b31 /include/linux/earlycpio.h
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
downloadlinux-ab953b9db3a1169fbc675c8de3d2dab919ce3211.tar.xz
regulator: qcom_spmi: Include offset when translating voltages
This driver converts voltages from a non-linear range in hardware to a linear range in software and vice versa. During the conversion, we exclude certain voltages that are invalid to use because the software interface is more flexible than reality. For example, the FTSMPS2P5 regulators have a voltage range from 80000uV to 1355000uV that software could support, but we only want to use the range of 350000uV to 1355000uV. If we don't account for the hw selectors between 80000uV and 350000uV we'll pick a hw selector of 0 to mean 350000uV when it really means 80000uV. This can cause us to program voltages into the hardware that are significantly lower than what we're expecting. And when we read it back from the hardware we'll have the same problem, voltages that are in the invalid band will end up being calculated as some software selector that represents a larger voltage than what is programmed and the user will be confused. Fix all this by properly offsetting the software selector and hw selector when converting from one number space to another. Fixes: 1b5b19689278 ("regulator: qcom_spmi: Only use selector based regulator ops") Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/earlycpio.h')
0 files changed, 0 insertions, 0 deletions