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

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

regulator: wm8350: Use wm8350_ldo_list_voltage instead of open code to verify selected voltage



Call wm8350_ldo_list_voltage() instead of open code to verify selected voltage
falls within specified range.
Use wm8350_ldo_list_voltage() here is less error prone.

wm8350_ldo_val_to_mvolts() is only used in wm8350_ldo_list_voltage now, so
remove it and move the implementation to wm8350_ldo_list_voltage().

This patch also include below small changes in wm8350_ldo_map_voltage:
1. wm8350_ldo_map_voltage() returns selector, thus rename variable mV to sel.
2. Use DIV_ROUND_UP macro to calculate selector.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent b4bc9ef6
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