This is a note to let you know that I've just added the patch titled regulator: defer probe when trying to get voltage from unresolved supply to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: regulator-defer-probe-when-trying-to-get-voltage-fro.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit fdd0594c99c2cff43762d3ade9f31c6bb18297e6 Author: MichaÅ? MirosÅ?aw <mirq-linux@xxxxxxxxxxxx> Date: Mon Nov 2 22:27:27 2020 +0100 regulator: defer probe when trying to get voltage from unresolved supply [ Upstream commit cf1ad559a20d1930aa7b47a52f54e1f8718de301 ] regulator_get_voltage_rdev() is called in regulator probe() when applying machine constraints. The "fixed" commit exposed the problem that non-bypassed regulators can forward the request to its parent (like bypassed ones) supply. Return -EPROBE_DEFER when the supply is expected but not resolved yet. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: MichaÅ? MirosÅ?aw <mirq-linux@xxxxxxxxxxxx> Reported-by: OndÅ?ej Jirman <megous@xxxxxxxxxx> Reported-by: Corentin Labbe <clabbe.montjoie@xxxxxxxxx> Tested-by: OndÅ?ej Jirman <megous@xxxxxxxxxx> Link: https://lore.kernel.org/r/a9041d68b4d35e4a2dd71629c8a6422662acb5ee.1604351936.git.mirq-linux@xxxxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c290c89421314..ad5235ca8e4ee 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3405,6 +3405,8 @@ static int _regulator_get_voltage(struct regulator_dev *rdev) ret = rdev->desc->fixed_uV; } else if (rdev->supply) { ret = _regulator_get_voltage(rdev->supply->rdev); + } else if (rdev->supply_name) { + return -EPROBE_DEFER; } else { return -EINVAL; }