public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Linus Walleij <linus.walleij@stericsson.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
	linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 1/4] regulator: add set_voltage_time[_sel] infrastructure
Date: Fri, 11 Mar 2011 12:25:37 +0000	[thread overview]
Message-ID: <20110311122536.GG1760@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1299840868-20613-1-git-send-email-linus.walleij@stericsson.com>

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.

  reply	other threads:[~2011-03-11 12:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 10:54 [PATCH 1/4] regulator: add set_voltage_time[_sel] infrastructure Linus Walleij
2011-03-11 12:25 ` Mark Brown [this message]
2011-03-11 14:45   ` Linus Walleij
2011-03-11 15:20     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110311122536.GG1760@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox