All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Liam Girdwood <lrg@ti.com>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Add gpio based voltage switching regulator
Date: Mon, 26 Sep 2011 13:51:55 +0100	[thread overview]
Message-ID: <20110926125155.GH2946@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201109260852.19859.heiko@sntech.de>

On Mon, Sep 26, 2011 at 08:52:18AM +0200, Heiko Stübner wrote:

> This patch adds support for regulators that can switch between
> two voltage levels by setting a gpio.

This really should be scalable beyond two voltages, or at least prepared
for that possibility.

> Handling of set_voltage calls with a range that fits neither the
> low nor the high voltage is determined by the inbetween_high
> option. When set to 1 the high voltage is used, on 0 the low
> voltage is used and on -EINVAL an error is returned, disallowing
> the usage of the voltage range.

No, don't do this.  If you can't set the requested voltage then fail.
This is not in the least bit driver specific.

> I'm not hung up on the "inbetween handling", in fact at the moment it
> seems to not belong there. But I'm not sure on how to handle
> frequency tables like
> 	[0] = { 1000000, 1150000 },
> 	[1] = { 1150000, 1250000 },
> 	[2] = { 1250000, 1350000 },
> I.e. the middle value should use the voltage in 2 for switch regulators,
> but the defined value for more intelligent ones.

I'm afraid I can't parse this, sorry.

> @@ -0,0 +1,320 @@
> +/*
> + * switched.c

This needs a better name.

Otherwise this looks good, the main thing is the ability to support more
voltages.

  reply	other threads:[~2011-09-26 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26  6:52 [RFC] Add gpio based voltage switching regulator Heiko Stübner
2011-09-26 12:51 ` Mark Brown [this message]
2011-09-28  8:02   ` Heiko Stübner
2011-09-28  9:03     ` Mark Brown
2011-09-30 10:59       ` [RFC v2] Add gpio-regulator driver Heiko Stübner

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=20110926125155.GH2946@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.