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 v3 1/4] regulator: helper routine to extract regulator_init_data
Date: Thu, 27 Oct 2011 10:09:53 +0200	[thread overview]
Message-ID: <20111027080953.GB18360@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1319702185-16108-2-git-send-email-rnayak@ti.com>

On Thu, Oct 27, 2011 at 01:26:22PM +0530, Rajendra Nayak wrote:

> +	min_uV = of_get_property(np, "regulator-min-uV", NULL);
> +	if (min_uV)
> +		(*init_data)->constraints.min_uV = be32_to_cpu(*min_uV);
> +	max_uV = of_get_property(np, "regulator-max-uV", NULL);
> +	if (max_uV)
> +		(*init_data)->constraints.max_uV = be32_to_cpu(*max_uV);

If we have min_uV and max_uV we should also set REGULATOR_CHANGE_VOLTAGE
(and similarly for the currents).  

We should also have a way to enable status changes - since there's an
always_on property (which does make sense) I'd suggest that as a first
pass we should enable status changes if always_on is not set (these two
things are a bit redundant in the existing constrints).  This is
slightly risky as you can get a situation where new device driver
support for regulators starts unexpectedly turning off supplies but
that's always going to be a risk with constraints disassociated from the
kernel.

  reply	other threads:[~2011-10-27  8:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27  7:56 [PATCH v3 0/4] Device tree support for regulators Rajendra Nayak
2011-10-27  7:56 ` [PATCH v3 1/4] regulator: helper routine to extract regulator_init_data Rajendra Nayak
2011-10-27  8:09   ` Mark Brown [this message]
2011-10-27 10:43     ` Nayak, Rajendra
2011-10-27 11:49       ` Mark Brown
2011-10-27 13:27         ` Rajendra Nayak
2011-10-27  7:56 ` [PATCH v3 2/4] regulator: adapt fixed regulator driver to dt Rajendra Nayak
2011-10-27 12:18   ` Mark Brown
2011-11-04 20:34   ` Olof Johansson
2011-11-04 21:01     ` Mark Brown
2011-11-04 21:18       ` Olof Johansson
2011-11-04 21:25         ` Mark Brown
2011-11-04 21:47           ` Olof Johansson
2011-11-04 21:57             ` Mark Brown
2011-11-04 22:09               ` Olof Johansson
2011-11-04 22:23                 ` Mark Brown
2011-11-07  6:27     ` Rajendra Nayak
2011-10-27  7:56 ` [PATCH v3 3/4] regulator: pass additional of_node to regulator_register() Rajendra Nayak
2011-10-27 12:20   ` Mark Brown
2011-10-27  7:56 ` [PATCH v3 4/4] regulator: map consumer regulator based on device tree Rajendra Nayak
2011-10-27 12:20   ` Mark Brown
2011-10-27  9:08 ` [PATCH v3 0/4] Device tree support for regulators Mark Brown
2011-11-04 20:21   ` Olof Johansson
2011-11-04 21:02     ` 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=20111027080953.GB18360@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).