devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Shawn Guo <shawn.guo@linaro.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH 2/2] PM / OPP: check for existing OPP list when initialising from device tree
Date: Wed, 1 May 2013 11:51:36 -0500	[thread overview]
Message-ID: <20130501165136.GB21171@kahuna> (raw)
In-Reply-To: <518143EF.3010900@arm.com>

On 17:33-20130501, Sudeep KarkadaNagesha wrote:
> On 01/05/13 16:04, Nishanth Menon wrote:
> > On 12:11-20130501, Sudeep.KarkadaNagesha@arm.com wrote:
> >> From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
[...]
> >> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> >> index 4dfdc01..66d52d2 100644
> >> --- a/drivers/base/power/opp.c
> >> +++ b/drivers/base/power/opp.c
> >> @@ -706,6 +706,11 @@ static int of_init_opp_table_from_ofnode(struct device *dev,
> >>  	const __be32 *val;
> >>  	int nr;
> >>  
> >> +	/* Check for existing list for 'dev' */
> >> +	dev_opp = find_device_opp(dev);
> >> +	if (!IS_ERR(dev_opp))
> >> +		return 0; /* Device OPP already initialized */
> >> +
> > It gets a little touchy here -> the normal expectation is for the OPP
> > entries to be populated onetime at boot.
> > For example - driver bug where same device was attempted twice Vs the
> > usecase you mention here - how'd we differentiate between the two?
> 
> Do we really need to differentiate ? How about returning -EEXIST ?
We have tried to provide enough debug information for developers to
detect and fix their mistakes, error value is one part of the story for
callers, error messages emphasis on top of it for the developer.. But,
for some reason I might be led to believe probe and hotplug are separate
usecases - probe of a device indicates it's presence, and hotplug of a
device should ideally be a power state.. But that is just me.
-- 
Regards,
Nishanth Menon

  reply	other threads:[~2013-05-01 16:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 11:11 [PATCH 0/2] PM / OPP: updates to enable sharing OPPs info Sudeep.KarkadaNagesha
2013-05-01 11:11 ` [PATCH 1/2] PM / OPP: add support to specify phandle of another node for OPP Sudeep.KarkadaNagesha
2013-05-01 14:41   ` Nishanth Menon
2013-05-01 16:28     ` Sudeep KarkadaNagesha
2013-05-01 16:49       ` Nishanth Menon
2013-05-13 16:12     ` Sudeep KarkadaNagesha
2013-05-01 11:11 ` [PATCH 2/2] PM / OPP: check for existing OPP list when initialising from device tree Sudeep.KarkadaNagesha
2013-05-01 15:04   ` Nishanth Menon
2013-05-01 16:33     ` Sudeep KarkadaNagesha
2013-05-01 16:51       ` Nishanth Menon [this message]
     [not found] ` <1367406679-21603-1-git-send-email-Sudeep.KarkadaNagesha-5wv7dgnIgG8@public.gmane.org>
2013-05-21 10:00   ` [PATCH 0/2] PM / OPP: updates to enable sharing OPPs info Sudeep KarkadaNagesha
2013-07-20  5:09     ` Grant Likely
2013-07-22 12:56       ` Sudeep KarkadaNagesha
2013-07-22 13:01       ` Sudeep KarkadaNagesha

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=20130501165136.GB21171@kahuna \
    --to=nm@ti.com \
    --cc=Sudeep.KarkadaNagesha@arm.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=shawn.guo@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;
as well as URLs for NNTP newsgroup(s).