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

Skip to content
Commit eb0c5686 authored by Heiko Stübner's avatar Heiko Stübner Committed by Mark Brown
Browse files

regulator: gpio-regulator: Split setting of voltages and currents



Originally gpio-regulator used the first item of its state list
that matched the given voltage or current range.

Commit 4dbd8f63 (regulator: gpio-regulator: Set the smallest voltage/current
in the specified range) changed this, to make the selection independent of
the ordering of the state list.

But selecting the minimal value is only true for voltage regulators.
For current regulators the maximum in the given range should be
selected instead.

Therefore split the previous common selection function into specific
functions for voltage and current regulators.

Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent cfa9cfbc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment