linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* gpio-pxa initcall level change and machine init breakage
@ 2013-04-20 15:26 Mike Dunn
  2013-04-21  6:02 ` Haojian Zhuang
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Dunn @ 2013-04-20 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

After a few months of neglect, I rebased my palm treo 680 kernel with the latest
from Linus' official tree, and now all the calls to gpio lib functions
(gpio_request(), etc) made from the init_machine() method in struct machine_desc
fail.  I tracked this back to commit 6c7e660a27da7494c670bfba21cfeba30457656c
dated Jan 23 2013

    gpio: pxa: set initcall level to module init

    gpio & pinctrl driver are used together. The pinctrl driver is already
    launched before gpio driver in Makefile. So set gpio driver to module
    init level. Otherwise, the sequence will be inverted.

    Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

At the time, Haojian addressed a question about this patch regarding module
dependencies, advising use of the deferred probe infrastructure.  But unless I'm
mistaken, mine is an initcall level problem, not a dependency issue among driver
probes.  Now that gpio-pxa initialization is at the device level (initcall6),
calls to gpiolib are no longer possible from init_machine(), which remains at
the initcall3 level.

I feel like I must be missing something, because a lot of pxa boards call
gpiolib from init machine(), so my breakage should not be an isolated case.

If I'm not missing anything and the patch is necessary, it looks like one
solution would be to move all the initializations that use gpiolib to the
init_late method in struct machine_desc, which runs as initcall7.

Grateful for any advice!

Thanks,
Mike

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-26 17:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-20 15:26 gpio-pxa initcall level change and machine init breakage Mike Dunn
2013-04-21  6:02 ` Haojian Zhuang
2013-04-21 22:23   ` Mike Dunn
2013-04-22  0:58     ` Haojian Zhuang
2013-04-23  7:26       ` Linus Walleij
2013-04-23  7:49         ` Haojian Zhuang
2013-04-23 19:42         ` Mike Dunn
2013-04-24 19:37           ` Linus Walleij
2013-04-25 19:36             ` Robert Jarzmik
2013-04-25 21:22               ` Linus Walleij
2013-04-26 17:48                 ` Robert Jarzmik
2013-04-26 12:38               ` Mike Dunn
2013-04-24 16:07   ` Mike Dunn

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).