regulator: tps65217: Fix voltage boundary checking in tps65217_pmic_map_voltage
authorAxel Lin <axel.lin@gmail.com>
Tue, 3 Jul 2012 07:19:33 +0000 (15:19 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 3 Jul 2012 19:18:34 +0000 (20:18 +0100)
commit844e6901df45d2021d1f81b25e61159b5af2687f
treeb63d4ec57222a331eb21cd052a24063312636004
parent0072f0a82ce78ceb634f00a57d80c9b421b061d4
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: Axel Lin <axel.lin@gmail.com>
Acked-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/tps65217-regulator.c
This page took 0.034504 seconds and 5 git commands to generate.