mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Nishanth Menon <nm@ti.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [RFC PATCH] regulator: core: allow consumers to request to closes step voltage
Date: Wed, 19 Jun 2013 23:38:28 +0100	[thread overview]
Message-ID: <20130619223828.GK1403@sirena.org.uk> (raw)
In-Reply-To: <1371669474-24473-1-git-send-email-nm@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

On Wed, Jun 19, 2013 at 02:17:54PM -0500, Nishanth Menon wrote:

> Account for step size accuracy when exact voltage requests are send for
> step based regulators.

If the consumer can tolerate a different voltage why not just request
the range that can be tolerated?  Your problem here is specifying an
exact voltage.

> The specific example I faced was using cpufreq-cpu0 driver with voltages
> for OPPs for MPU rail and attempting the common definitions against voltages
> that are non-exact multiples of stepsize of PMIC.

> The alternative would be implement custom set_voltage (as againsta simpler
> set_voltage_sel and using linear map/list functions) for the regulator which
> will account for the same.

> Yet another alternative might be to introduce yet another custom function similar
> to regulator_set_voltage_tol which accounts for this. something like:
> regulator_set_voltage_floor(regulator, voltage, tol) or something to that effect.

Or as I keep telling you guys the consumer can just do that directly
using the existing API; the whole point in specifying the voltage as a
range is to allow the consumer to cope with arbatrary regulators by
giving a range of voltages that it can accept.

The API is deliberately very conservative in these matters since there
is a danger of physical damage if things really go wrong in some
applications, it makes sure that both the drivers and the system
integration are involved.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-06-19 22:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 19:17 Nishanth Menon
2013-06-19 22:38 ` Mark Brown [this message]
2013-06-20 12:45   ` Nishanth Menon
2013-06-20 21:43     ` Nishanth Menon
2013-06-21  9:51     ` Mark Brown
2013-06-21 12:43       ` Nishanth Menon
2013-06-21 14:30         ` 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=20130619223828.GK1403@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    /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

all inboxes | Powered by JetHome®