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

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

regulator: da9055: Select maximum current in specific range for set_current_limit

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

This issue was reported by Heiko Stuebner for gpio-regulator driver [1],
and the conclusion is to select the max current for current regulators [2].

[1] https://lkml.org/lkml/2012/8/5/162
[2] https://lkml.org/lkml/2012/8/6/183



This patch also ensures da9055_buck_set_current_limit return -EINVAL when the
supported current limit does not meet the request range.

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