Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

regulator: ad5398: show changing current in uA



Integer division may truncate the result.
Current code shows changing current is 0mA when selector is 1 ... 8.

For example:
selector = 1
ad5398_calc_current returns 117, debug message shows 117/1000 = 0mA
selector = 2
ad5398_calc_current returns 234, debug message shows 234/1000 = 0mA
selector = 3
ad5398_calc_current returns 351, debug message shows 351/1000 = 0mA
............
selector = 8
ad5398_calc_current returns 937, debug message shows 937/1000 = 0mA

Show the changing current in uA makes it easier for debugging.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 36a2afd8
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