From: Stefan Agner <stefan@agner.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
Shawn Guo <shawn.guo@freescale.com>,
Sascha Hauer <kernel@pengutronix.de>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] pinctrl: imx: add gpio pinmux support for vf610
Date: Tue, 23 Sep 2014 13:24:18 +0200 [thread overview]
Message-ID: <0498face86b4dcbdf35619c8b124675c@agner.ch> (raw)
In-Reply-To: <CACRpkdYk0zW12qNXgOstTLmdVDYacu0Un+8quTN+J_azOic7AA@mail.gmail.com>
Am 2014-09-23 11:48, schrieb Linus Walleij:
> On Sat, Sep 6, 2014 at 6:25 PM, Stefan Agner <stefan@agner.ch> wrote:
>
>> Add pinmux support for GPIO for Vybrid (vf610) IOMUX controller.
>> This is needed since direction configuration is not part of the
>> GPIO module in Vybrid.
>>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
> (...)
>
>> -arch_initcall(vf610_pinctrl_init);
>> +postcore_initcall(vf610_pinctrl_init);
>
> Why is this necessary? You should be able to rely on deferred
> probing to do its work here. I think this should be module_init()
> or driver_initcall() really.
Currently deferred probe doesn't work for gpiolib drivers which try to
add gpio-ranges from device tree:
gpiochip_add calls of_gpiochip_add_pin_range (through of_gpiochip_add).
This function tries to get the pinctrl driver, which is not registred at
that time. Currently the driver does not defer probing but fails
silently...
We would need to alter the return values of those two functions
(of_gpiochip_add_pin_range/of_gpiochip_add) and honor the return value
in gpiochip_add.
Currently, it seems that we quite often use an early initcall to get the
pinctrl loaded early:
$ grep -h -o ".*_initcall" drivers/pinctrl/*.c | sort | uniq -c
18 arch_initcall
3 core_initcall
3 postcore_initcall
1 subsys_initcall
IMHO for those core services, it also makes sense to have them
initialized early. I'd rather prefer this hard coded than having dozens
of "requests probe deferral" messages...
--
Stefan
next prev parent reply other threads:[~2014-09-23 11:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-06 16:25 [PATCH 0/4] vf610: Add GPIO support Stefan Agner
2014-09-06 16:25 ` [PATCH 1/4] pinctrl: imx: detect uninitialized pins Stefan Agner
2014-09-23 9:46 ` Linus Walleij
2014-09-06 16:25 ` [PATCH 2/4] pinctrl: imx: add gpio pinmux support for vf610 Stefan Agner
2014-09-23 9:48 ` Linus Walleij
2014-09-23 11:24 ` Stefan Agner [this message]
2014-09-06 16:25 ` [PATCH 3/4] gpio: vf610: add gpiolib/IRQ chip driver for Vybird Stefan Agner
2014-09-23 9:58 ` Linus Walleij
2014-09-23 11:51 ` Stefan Agner
2014-09-24 11:10 ` Linus Walleij
2014-09-24 15:14 ` Stefan Agner
2014-09-06 16:25 ` [PATCH 4/4] ARM: dts: vf610: Use new GPIO support Stefan Agner
2014-09-23 9:59 ` Linus Walleij
2014-09-19 17:36 ` [PATCH 0/4] vf610: Add " Linus Walleij
2014-09-23 9:28 ` Linus Walleij
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=0498face86b4dcbdf35619c8b124675c@agner.ch \
--to=stefan@agner.ch \
--cc=gnurou@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@freescale.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;
as well as URLs for NNTP newsgroup(s).