linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] regulator: twl6030: add support for vdd1, vdd2 and vdd3 regulators
Date: Fri, 24 Feb 2012 13:24:09 +0000	[thread overview]
Message-ID: <20120224132408.GF5450@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1330089398.4102.539.camel@sokoban>

On Fri, Feb 24, 2012 at 03:16:38PM +0200, Tero Kristo wrote:

> I still ain't quite sure how this would work, do you mean adding
> something like this:

> +static int twl6030smps_list_voltage(struct regulator_dev *rdev,
> +                                   unsigned int selector)
> +{
> +       return selector;
> +}

Yes.

> I believe this would fail still. I took a look at a few drivers that use
> regulator_list_voltage(), but all of these seem to numerate voltages
> based on regulator_count_voltages(), which will return -EINVAL for the
> SMPS ones as the num_voltages is zero. Also, even if I defined
> num_voltages here, I would be attempting to list_voltage for zero index,
> returning zero, but this would be invalid voltage for the cpu obviously
> (and is also out of range for the regulator min_voltage, and also
> according to docs invalid return value for the function in the first
> place.)

Well, clearly some of the values won't actually be useful and you should
feel free to return error values for those or apply an offset or
something but the basic principle applies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120224/f044e41f/attachment.sig>

  reply	other threads:[~2012-02-24 13:24 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 [this message]
2012-02-24 13:56           ` Tero Kristo
2012-02-24 14:01             ` Mark Brown
2012-02-24 14:25               ` Tero Kristo
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=20120224132408.GF5450@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.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).