From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Roland Stigge <stigge@antcom.de>,
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 17:23:23 +0000 [thread overview]
Message-ID: <201206161723.23768.arnd@arndb.de> (raw)
In-Reply-To: <1339865375-22314-1-git-send-email-stigge@antcom.de>
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?
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
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 17:23:23 +0000 [thread overview]
Message-ID: <201206161723.23768.arnd@arndb.de> (raw)
In-Reply-To: <1339865375-22314-1-git-send-email-stigge@antcom.de>
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?
Arnd
next prev parent reply other threads:[~2012-06-16 17:23 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 [this message]
2012-06-16 17:23 ` Arnd Bergmann
2012-06-16 19:04 ` Roland Stigge
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=201206161723.23768.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=aletes.xgr@gmail.com \
--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=stigge@antcom.de \
--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.