linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Lee Jones <lee.jones@linaro.org>, Simon <horms@verge.net.au>,
	Magnus <magnus.damm@gmail.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: About gpio-regulator setting on DT
Date: Wed, 29 Jan 2014 16:16:03 +0000	[thread overview]
Message-ID: <52E92943.8010401@codethink.co.uk> (raw)
In-Reply-To: <20140129124516.GZ11841@sirena.org.uk>

On 29/01/14 12:45, Mark Brown wrote:
> On Wed, Jan 29, 2014 at 12:38:19AM -0800, Kuninori Morimoto wrote:
>
>> How to set GPIOF_OUT_INIT_HIGH via DT ?
>> Or, am I misunderstanding ?
>
> The combination of the enable-active-high and enable-at-boot properties
> ought be able to cause the driver to do the right thing, the flags do
> this:
>
> 	if (config->enabled_at_boot) {
> 		if (config->enable_high)
> 			cfg.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH;
> 		else
> 			cfg.ena_gpio_flags |= GPIOF_OUT_INIT_LOW;
> 	} else {
> 		if (config->enable_high)
> 			cfg.ena_gpio_flags |= GPIOF_OUT_INIT_LOW;
> 		else
> 			cfg.ena_gpio_flags |= GPIOF_OUT_INIT_HIGH;
> 	}
>
> of_get_named_gpio() just looks up the GPIO number, it doesn't request
> the GPIO.

I think you've just run in to the same problem that we've found
with the GPIO regulator code for the vmmcq on the lager where the
DT probed version is getting 1800mV for MMC whereas the platform
probed version gets 3300mV for MMC (and thus works better).

My view is that we should really add an initialisation voltage
setting to the regulators so that if there is >2 states we can
select the state it starts in.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  reply	other threads:[~2014-01-29 16:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  8:38 About gpio-regulator setting on DT Kuninori Morimoto
2014-01-29 12:45 ` Mark Brown
2014-01-29 16:16   ` Ben Dooks [this message]
2014-01-29 16:51     ` Mark Brown
2014-01-30  0:08   ` Kuninori Morimoto
2014-01-30 12:12     ` Mark Brown
2014-01-31  5:25       ` [PATCH] regulator: gpio: bugfix: add gpios-status for DT Kuninori Morimoto
2014-02-04 18:43         ` Mark Brown
2014-02-12  1:27           ` [PATCH 1/2] regulator: gpio: print warning if gpios <-> gpios-states mismatch on DT Kuninori Morimoto
2014-02-12 12:01             ` Mark Brown
2014-02-12  1:27           ` [PATCH 2/2] regulator: gpio: explain detail of gpios-states Kuninori Morimoto

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=52E92943.8010401@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.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;
as well as URLs for NNTP newsgroup(s).