lkml.org 
[lkml]   [2012]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: core: if voltage scaling fails, restore original
On Wed, 12 Dec 2012, Paolo Pisati wrote:

> but inside regulator_set_voltage(), we save the new regulator voltage before
> actually ramping up:
>
> core.c::regulator_set_voltage():
> ...
> regulator->min_uV = min_uV;
> regulator->max_uV = max_uV;
>
> ret = regulator_check_consumers(rdev, &min_uV, &max_uV);
> if (ret < 0)
> goto out2;
>
> ret = _regulator_do_set_voltage(rdev, min_uV, max_uV); <-- ERROR!!!
> if (ret < 0)
> goto out2;
> ...

I'm not too familiar with this code. But isn't this where the bug is,
rather than in that optimization commit you mentioned? Seems to me,
naïvely, that in the above code, regulator->min_uV and regulator->max_uV
should be set only after _regulator_do_set_voltage() succeeds?


- Paul
\
 
 \ /
  Last update: 2012-12-13 06:41    [W:0.177 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site