lkml.org 
[lkml]   [2011]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/4] regulator: add set_voltage_time[_sel] infrastructure
    On Fri, Mar 11, 2011 at 11:54:28AM +0100, Linus Walleij wrote:

    > + /* Don't obtain this if it's not going to be used */
    > + if (rdev->desc->ops->set_voltage_time) {
    > + int old_voltage = -1;
    > +
    > + ret = _regulator_get_voltage(rdev);
    > + if (ret < 0)
    > + return ret;
    > + old_voltage = ret;
    > + /* Here we can figure out desired delay immediately */
    > + ret = rdev->desc->ops->set_voltage_time(rdev, old_voltage,
    > + min_uV, max_uV);

    I think this should be taking to as the argument rather than min and
    max. We're going to figure out an actual concrete voltage or selector
    during the set voltage process so there's no point in having to go
    through and pick a specific voltage twice. Actually, given that
    list_voltage() pretty much mandates selectors we can probably just only
    have a selector based version of this API then use the selector that got
    returned when we set the voltage.

    I also think we should be exporting this to consumers as things like
    cpufreq are interested in the latency for voltage changes.


    \
     
     \ /
      Last update: 2011-03-11 13:27    [W:6.815 / U:1.444 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site