mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>, Grant Likely <grant@secretlab.ca>,
	linux-kernel@vger.kernel.org,
	patches@opensource.wolfsonmicro.com, "G,
	Manjunath Kondaiah" <manjugk@ti.com>
Subject: Re: [PATCH] regulator: Support driver probe deferral
Date: Thu, 29 Sep 2011 11:35:15 -0500	[thread overview]
Message-ID: <20110929163515.GA6800@ponder.secretlab.ca> (raw)
In-Reply-To: <1317294661-22080-1-git-send-email-broonie@opensource.wolfsonmicro.com>

On Thu, Sep 29, 2011 at 12:11:01PM +0100, Mark Brown wrote:
> If we fail to locate a requested regulator return -EAGAIN. If drivers
> pass this error code through to their caller (which they really should)
> then this will ensure that the probe is retried later when further devices
> become available.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

Manjunath, can you add this to a series with the deferred probe patch?
You'll need to change the return code as discussed in the other
thread.

g.

> ---
> 
> This depends on Grant's change to implement deferred probing, the error
> code for which is going to change in the next revision.  Liam, if you're
> also OK with this change I propose that we both ack it and let it get
> carried along with the deferred probing change.
> 
>  drivers/regulator/core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index d5656b7..b39ec9f 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -1154,7 +1154,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
>  {
>  	struct regulator_dev *rdev;
>  	struct regulator_map *map;
> -	struct regulator *regulator = ERR_PTR(-ENODEV);
> +	struct regulator *regulator = ERR_PTR(-EAGAIN);
>  	const char *devname = NULL;
>  	int ret;
>  
> @@ -2727,7 +2727,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
>  		if (!found) {
>  			dev_err(dev, "Failed to find supply %s\n",
>  				init_data->supply_regulator);
> -			ret = -ENODEV;
> +			ret = -EAGAIN;
>  			goto scrub;
>  		}
>  
> -- 
> 1.7.6.3
> 

      reply	other threads:[~2011-09-29 20:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 11:11 Mark Brown
2011-09-29 16:35 ` Grant Likely [this message]

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=20110929163515.GA6800@ponder.secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=manjugk@ti.com \
    --cc=patches@opensource.wolfsonmicro.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

all inboxes | Powered by JetHome®