All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Stigge <stigge@antcom.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org, cjb@laptop.org,
	grant.likely@secretlab.ca, rob.herring@calxeda.com,
	rmk+kernel@arm.linux.org.uk, ulf.hansson@stericsson.com,
	linus.walleij@linaro.org, sebastian.rasmussen@stericsson.com,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	aletes.xgr@gmail.com
Subject: Re: [PATCH v2] mmc: mmci.c: Defer probe() in case of yet uninitialized GPIOs
Date: Sat, 16 Jun 2012 21:04:17 +0200	[thread overview]
Message-ID: <4FDCD8B1.5000407@antcom.de> (raw)
In-Reply-To: <201206161723.23768.arnd@arndb.de>

On 16/06/12 19:23, Arnd Bergmann wrote:
> On Saturday 16 June 2012, Roland Stigge wrote:
>> +       if (of_get_property(np, "wp-gpios", NULL)) {
>> +               pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
>> +               if (pdata->gpio_wp == -ENODEV)
>> +                       pdata->gpio_wp = -EPROBE_DEFER;
>> +       } else {
>> +               pdata->gpio_wp = -ENODEV;
>> +       }
> 
> This is still very ugly and there is a certain danfer that we might
> have to duplicate this across more drivers. Can't we make
> of_get_named_gpio_flags return -EPROBE_DEFER in cases where we can't
> find the GPIO number yet but still have a chance of returning it at
> a later point?

OK, will post a new patch.

Roland

WARNING: multiple messages have this Message-ID (diff)
From: stigge@antcom.de (Roland Stigge)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] mmc: mmci.c: Defer probe() in case of yet uninitialized GPIOs
Date: Sat, 16 Jun 2012 21:04:17 +0200	[thread overview]
Message-ID: <4FDCD8B1.5000407@antcom.de> (raw)
In-Reply-To: <201206161723.23768.arnd@arndb.de>

On 16/06/12 19:23, Arnd Bergmann wrote:
> On Saturday 16 June 2012, Roland Stigge wrote:
>> +       if (of_get_property(np, "wp-gpios", NULL)) {
>> +               pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
>> +               if (pdata->gpio_wp == -ENODEV)
>> +                       pdata->gpio_wp = -EPROBE_DEFER;
>> +       } else {
>> +               pdata->gpio_wp = -ENODEV;
>> +       }
> 
> This is still very ugly and there is a certain danfer that we might
> have to duplicate this across more drivers. Can't we make
> of_get_named_gpio_flags return -EPROBE_DEFER in cases where we can't
> find the GPIO number yet but still have a chance of returning it at
> a later point?

OK, will post a new patch.

Roland

  reply	other threads:[~2012-06-16 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 16:49 [PATCH v2] mmc: mmci.c: Defer probe() in case of yet uninitialized GPIOs Roland Stigge
2012-06-16 16:49 ` Roland Stigge
2012-06-16 17:23 ` Arnd Bergmann
2012-06-16 17:23   ` Arnd Bergmann
2012-06-16 19:04   ` Roland Stigge [this message]
2012-06-16 19:04     ` Roland Stigge

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=4FDCD8B1.5000407@antcom.de \
    --to=stigge@antcom.de \
    --cc=aletes.xgr@gmail.com \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=rob.herring@calxeda.com \
    --cc=sebastian.rasmussen@stericsson.com \
    --cc=ulf.hansson@stericsson.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.