linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] regulator: twl6030: add support for vdd1, vdd2 and vdd3 regulators
Date: Fri, 24 Feb 2012 16:25:12 +0200	[thread overview]
Message-ID: <1330093512.4102.552.camel@sokoban> (raw)
In-Reply-To: <20120224140109.GG5450@opensource.wolfsonmicro.com>

On Fri, 2012-02-24 at 14:01 +0000, Mark Brown wrote:
> On Fri, Feb 24, 2012 at 03:56:05PM +0200, Tero Kristo wrote:
> 
> > So, do you want me to also change the num_voltages value for the
> > regulator from zero to be the same as max_uV, as we have this check
> > within regulator/core:
> 
> >        if (!ops->list_voltage || selector >= rdev->desc->n_voltages)
> >                 return -EINVAL;
> 
> > This will also potentially make some code to iterate over regulator
> > voltages for ~1.5M times. I still don't think adding list_voltage for
> > the SMPS regulators makes any sense, unless either the API for
> > regulator_list_voltage is changed, or we change the control for these
> > regulators completely from set_voltage() based to set_voltage_sel()
> > based implementation.
> 
> Well, the important thing here is to fill in something useful for the
> returned selector rather than just leaving it undefined.  Providing a
> list_voltage() would be nice and make things more robust.

Still, setting selector in this case does nothing, as it is immediately
overwritten by the regulator core by -1. This looks like a perfectly
acceptable way to implement a regulator, as everything checks for the
presence of list_voltage anyway.

If you really insist, I could probably make something that does a
list_voltage and shows min and max voltages for the regulator, but I
don't know about the usefulness of that.

-Tero

  reply	other threads:[~2012-02-24 14:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 11:05 [PATCH] regulator: twl6030: add support for vdd1, vdd2 and vdd3 regulators Tero Kristo
2012-02-23 15:34 ` Mark Brown
2012-02-24  9:38   ` Tero Kristo
2012-02-24 11:49     ` Mark Brown
2012-02-24 13:16       ` Tero Kristo
2012-02-24 13:24         ` Mark Brown
2012-02-24 13:56           ` Tero Kristo
2012-02-24 14:01             ` Mark Brown
2012-02-24 14:25               ` Tero Kristo [this message]
2012-02-24 14:34                 ` Mark Brown
2012-02-24 14:42                   ` Tero Kristo
2012-02-24 14:50                     ` Mark Brown
2012-02-24 15:04                       ` Tero Kristo

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=1330093512.4102.552.camel@sokoban \
    --to=t-kristo@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).