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

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

regulator: tps65217: Fix voltage boundary checking in tps65217_pmic_map_voltage



It is ok to request voltage with min_uV < tps->info[rid]->min_uV and
max_uV > tps->info[rid]->max_uV.

The equation we used in uv_to_vsel() does not allow
min_uV < tps->info[rid]->min_uV, otherwise it returns negative selector.
So we need to set min_uV = tps->info[rid]->min_uV if
min_uV < tps->info[rid]->min_uV.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarAnilKumar Ch <anilkumar@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 0072f0a8
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