mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: <cpufreq@vger.kernel.org>, <linux-pm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Shawn Guo <shawn.guo@linaro.org>, Nishanth Menon <nm@ti.com>
Subject: [PATCH 0/2] cpufreq/regulator: Handle regulators that defer probe with device tree bindings
Date: Thu, 4 Apr 2013 23:21:46 -0500	[thread overview]
Message-ID: <1365135708-23886-1-git-send-email-nm@ti.com> (raw)

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



             reply	other threads:[~2013-04-05  4:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05  4:21 Nishanth Menon [this message]
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

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=1365135708-23886-1-git-send-email-nm@ti.com \
    --to=nm@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=shawn.guo@linaro.org \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®