Commit 3f24f5ad authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: core: Fix getting input_uV when supplied by another regulator

When supplied by another regulator, returns the supply regulator's output
voltage for inpu_uV.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent eba41a5e
......@@ -649,7 +649,7 @@ static void drms_uA_update(struct regulator_dev *rdev)
/* get input voltage */
input_uV = 0;
if (rdev->supply)
input_uV = _regulator_get_voltage(rdev);
input_uV = regulator_get_voltage(rdev->supply);
if (input_uV <= 0)
input_uV = rdev->constraints->input_uV;
if (input_uV <= 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment