linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] cpufreq/regulator: Handle regulators that defer probe with device tree bindings
@ 2013-04-05  4:21 Nishanth Menon
  2013-04-05  4:21 ` [PATCH 1/2] regulator: core: return err value for regulator_get if there is no DT binding Nishanth Menon
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Nishanth Menon @ 2013-04-05  4:21 UTC (permalink / raw)
  To: cpufreq, linux-pm, linux-kernel
  Cc: Liam Girdwood, Mark Brown, Rafael J. Wysocki, Viresh Kumar,
	Shawn Guo, Nishanth Menon

Hi,
Currently get_regulator returns -EPROBE_DEFER in the case of regulator supply
which have no device tree node or even if regulator which are depicted in device
tree node is defering it's registration for valid reasons.

This makes it impossible to use an regulator that registers itself after
cpufreq-cpu0 probe is complete. The reason for the same is regulator framework
fails to return appropriate error value when device tree binding is not actually
present as a node.

Once we fix that, we can then fix cpufreq-cpu0 to make intelligent decisions
based on return value.

Nishanth Menon (2):
  regulator: core: return err value for regulator_get if there is no DT
    binding
  cpufreq: cpufreq-cpu0: defer probe when regulator is not ready

 drivers/cpufreq/cpufreq-cpu0.c |   20 ++++++++++++++------
 drivers/regulator/core.c       |    4 ++--
 2 files changed, 16 insertions(+), 8 deletions(-)

Series is based off tag v3.9-rc5 (also applies on rafael's bleeding-edge branch)

Series is also available at:
https://github.com/nmenon/linux-2.6-playground/commits/push/cpufreq-regulator-fixing-v1
git link: git://github.com/nmenon/linux-2.6-playground.git
branch: push/cpufreq-regulator-fixing-v1

Test scenarios(performed on 3.9-rc3 on beagle-XM platform):
test #1:  cpu0-supply binding is not present:
	http://pastebin.com/0SSC1HAw
test #2: cpu0-supply binding is present, but regulator defers probing:
	http://pastebin.com/HCSJqtRK
test #3: cpu0-supply binding is present, but regulator never registers (bug in DT binding)
	http://pastebin.com/guUwQcGW
test #4: cpu0-supply binding is present, regulator is available:
	http://pastebin.com/hsbBdxiz
	
Sub Note: This series might not be important for 3.9, considering the regulator
bug has been around since last year, however, it might be nice to have it fixed
up in 3.10 sometime.

Regards,
Nishanth Menon
-- 
1.7.9.5



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

end of thread, other threads:[~2013-04-16 21:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05  4:21 [PATCH 0/2] cpufreq/regulator: Handle regulators that defer probe with device tree bindings Nishanth Menon
2013-04-05  4:21 ` [PATCH 1/2] regulator: core: return err value for regulator_get if there is no DT binding Nishanth Menon
2013-04-05 10:17   ` Mark Brown
2013-04-16 21:45     ` [PATCH V2 " Nishanth Menon
2013-04-05  4:21 ` [PATCH 2/2] cpufreq: cpufreq-cpu0: defer probe when regulator is not ready Nishanth Menon
2013-04-05  5:13 ` [PATCH 0/2] cpufreq/regulator: Handle regulators that defer probe with device tree bindings Viresh Kumar
2013-04-05  6:13 ` Shawn Guo

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