Skip to content
Unverified Commit a336dc8f authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: da9052: Ensure enough delay time for .set_voltage_time_sel



Use DIV_ROUND_UP to prevent truncation by integer division issue.
This ensures we return enough delay time.

Also fix returning negative value when new_sel < old_sel.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210618141412.4014912-1-axel.lin@ingics.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9bc146ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment