All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: Add SPEAr pinctrl drivers
Date: Tue, 03 Apr 2012 16:43:39 -0600	[thread overview]
Message-ID: <4F7B7D1B.7030507@wwwdotorg.org> (raw)
In-Reply-To: <CACRpkdZYccTvHEMa=4=-uoLZYQxEPS+932UPA7MGc+-94eLc6w@mail.gmail.com>

On 04/03/2012 03:24 PM, Linus Walleij wrote:
> On Tue, Apr 3, 2012 at 3:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 
>> The initialization order dependencies can now be handled using
>> the deferred probe mechanism, by returning -EPROBE_DEFER from
>> the probe() function of any driver that is loaded before its
>> pins are available.
> 
> So how do I as a driver writer do that?
> 
> Example: drivers/tty/serial/sirfsoc_uart.c:
> 
> #include <linux/pinctrl/consumer.h>
> 
> probe() {
>        if (sirfport->hw_flow_ctrl) {
>                 sirfport->p = pinctrl_get_select_default(&pdev->dev);
>                 ret = IS_ERR(sirfport->p);
>                 if (ret)
>                         goto pin_err;
>         }
> 
> pin_err:
>     (...)
>    return ret;
> 
> So basically the pinctrl subsystem needs to return -EPROBE_DEFER
> to the driver in this case, so it can escalate that further.

Yes, I believe so.

There should be a couple of comments in pinctrl now (well, perhaps some
of them aren't there yet until my DT patches are applied!) that indicate
where -EPROBE_DEFER should be returned.

  reply	other threads:[~2012-04-03 22:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a1b7f612544a09989cec80a0318f35b6e48eb1d3.1333453148.git.viresh.kumar@st.com>
2012-04-03 13:47 ` [PATCH] pinctrl: Add SPEAr pinctrl drivers Arnd Bergmann
2012-04-03 14:10   ` viresh kumar
2012-04-03 17:09     ` viresh kumar
2012-04-03 19:33       ` Arnd Bergmann
2012-04-04  4:14         ` Viresh Kumar
2012-04-03 16:19   ` Stephen Warren
2012-04-03 19:37     ` Arnd Bergmann
2012-04-03 21:24   ` Linus Walleij
2012-04-03 22:43     ` Stephen Warren [this message]
2012-04-10  7:54       ` Linus Walleij
2012-04-04  7:45     ` Arnd Bergmann
2012-04-03 21:18 ` Linus Walleij
2012-04-04  4:17   ` Viresh Kumar

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=4F7B7D1B.7030507@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.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 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.