linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sdmmc controllers without vmmc regulator
@ 2012-02-24 21:35 Stephen Warren
  2012-02-25 11:57 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2012-02-24 21:35 UTC (permalink / raw)
  To: Mark Brown (broonie@opensource.wolfsonmicro.com),
	Liam Girdwood (lrg@ti.com),
	Chris Ball
  Cc: Marek Szyprowski, linux-mmc, linux-kernel

sdhci_add_host() calls regulator_get(..., "vmmc"), which under device-
tree calls of_get_regulator(), which contains:

	regnode = of_parse_phandle(dev->of_node, prop_name, 0);

	if (!regnode) {
		dev_warn(dev, "%s property in node %s references invalid phandle",
				prop_name, dev->of_node->full_name);
		return NULL;
	}

Thus if the vmmc-supply property is missing, because a board has no
regulator for a particular SD controller (power is always on), then
the warning is printed.

Can we eliminate this warning in of_get_regulator(), and let clients
Control whether they warn when a regulator isn't found, if they think
one is mandatory? I think I'd prefer this option; it's consistent with
the non-DT path in regulator_dev_lookup().

Or, should I set up dummy regulators in device tree to cover this case,
such that an SD controller's vmmc-supply always points at a valid phandle.
In which case, I'd have to add DT support to the dummy regulator.

Thanks.

-- 
nvpublic


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sdmmc controllers without vmmc regulator
  2012-02-24 21:35 sdmmc controllers without vmmc regulator Stephen Warren
@ 2012-02-25 11:57 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-02-25 11:57 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Liam Girdwood (lrg@ti.com),
	Chris Ball, Marek Szyprowski, linux-mmc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

On Fri, Feb 24, 2012 at 01:35:08PM -0800, Stephen Warren wrote:

> Can we eliminate this warning in of_get_regulator(), and let clients
> Control whether they warn when a regulator isn't found, if they think
> one is mandatory? I think I'd prefer this option; it's consistent with
> the non-DT path in regulator_dev_lookup().

This would be sensible but...

> Or, should I set up dummy regulators in device tree to cover this case,
> such that an SD controller's vmmc-supply always points at a valid phandle.
> In which case, I'd have to add DT support to the dummy regulator.

...you really ought to be doing this anyway (except with the fixed
voltage regulator, the dummy regulator is for stubbing out regulator
support entirely on systems with just one or two software controlled
regulators or where you don't have any information on the board design).
The MMC regulator usage is a bit of a mess for historical reasons, it
shouldn't really be conditional.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-25 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-24 21:35 sdmmc controllers without vmmc regulator Stephen Warren
2012-02-25 11:57 ` Mark Brown

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).