未验证 提交 5816df2f 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: wm8350: Select maximum current in specific range

.set_current_limit callback should select the current closest to max_uA.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 45aa908d
......@@ -99,7 +99,7 @@ static int get_isink_val(int min_uA, int max_uA, u16 *setting)
{
int i;
for (i = 0; i < ARRAY_SIZE(isink_cur); i++) {
for (i = ARRAY_SIZE(isink_cur) - 1; i >= 0; i--) {
if (min_uA <= isink_cur[i] && max_uA >= isink_cur[i]) {
*setting = i;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册