Commit 4f3323b
regulator: core: streamline supply resolution for always-on/boot-on regulators
For always-on and boot-on regulators, regulator_register() is currently
trying to anticipate the requirement to resolve a supply early.
Unfortunately, this code executes too early, before we have potentially
updated the regulator's always_on constraint as part of
set_machine_constraints(), causing it to miss cases.
Rather than trying to hack it more, just defer to the outcome of
set_machine_constraints(). The latter returns early (without doing any
regulator initialisation) with -EPROBE_DEFER as of commit 'regulator:
core: move supply check earlier in set_machine_constraints()' and is
therefore safe to call multiple times to determine if supplies need to
be resolved early.
Commit 8a866d5 ("regulator: core: Resolve supply name earlier to
prevent double-init") (later updated by
commit 520fb17 ("regulator: core: Fix regulator supply
registration with sysfs")) added these tests originally to avoid
calling set_machine_constraints() multiple times to try to avoid
voltage glitches due to all the regulator initialisation happening each
time. This isn't an issue anymore as per above.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260109-regulators-defer-v2-4-1a25dc968e60@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 86a8eeb commit 4f3323b
1 file changed
Lines changed: 4 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5937 | 5937 | | |
5938 | 5938 | | |
5939 | 5939 | | |
5940 | | - | |
5941 | 5940 | | |
5942 | 5941 | | |
5943 | 5942 | | |
| |||
6075 | 6074 | | |
6076 | 6075 | | |
6077 | 6076 | | |
6078 | | - | |
6079 | | - | |
6080 | | - | |
6081 | | - | |
6082 | | - | |
6083 | | - | |
6084 | | - | |
6085 | | - | |
6086 | | - | |
6087 | | - | |
6088 | | - | |
6089 | 6077 | | |
6090 | 6078 | | |
6091 | 6079 | | |
| |||
6099 | 6087 | | |
6100 | 6088 | | |
6101 | 6089 | | |
6102 | | - | |
6103 | | - | |
6104 | | - | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
6105 | 6094 | | |
6106 | 6095 | | |
6107 | 6096 | | |
| |||
0 commit comments