You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
regulator: core: repeat voltage setting request for stepped regulators
The regulator_set_voltage() function may exhibit unexpected behavior if the
target regulator has a maximum voltage step constraint. With such a
constraint, the regulator core may clamp the requested voltage to a lesser
value, to ensure that the voltage delta stays under the specified limit.
This means that the resulting regulator voltage depends on the current
voltage, as well as the requested range, which invalidates the assumption
that a repeated request for a specific voltage range will amount to a noop.
Considering the case of a regulator with a maximum voltage step constraint
of 1V:
initial voltage: 2.5V
consumer requests 4V
expected result: 3.5V
resulting voltage: 3.5V
consumer requests 4V again
expected result: 4V
actual result: 3.5V
Correct this by repeating attempts to balance the regulator voltage until
the result converges.
Signed-off-by: Romain Gantois <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
0 commit comments