From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/10] mach-u300: rewrite gpio driver, move to drivers/gpio
Date: Fri, 20 May 2011 09:46:06 +0200 [thread overview]
Message-ID: <BANLkTimMzEDm1wGu4TaYnsOQAu-e=90SAg@mail.gmail.com> (raw)
In-Reply-To: <20110520065248.GB21285@ponder.secretlab.ca>
2011/5/20 Grant Likely <grant.likely@secretlab.ca>:
> On Thu, May 19, 2011 at 02:25:47PM +0200, Linus Walleij wrote:
>> On Thu, May 19, 2011 at 1:38 PM, Barry Song <21cnbao@gmail.com> wrote:
>>
>> >> -arch_initcall(u300_gpio_init);
>> >> -module_exit(u300_gpio_exit);
>> >>
>> > looks like the driver can't be a real module, is the module_exit
>> > suitable? it looks strange module_exit plays together with
>> > arch_initcall.
>>
>> It's a rather common design pattern in the kernel for early
>> platform drivers. Either the dependencies are resolved by the
>> different initlevels or they are resolved in probe order with
>> loadable modules. Module load will call all initlevels in order.
>>
>> It is not elegant but it is common.
>
> but it does need to be fixed. ?Unfortunately it is not simple. ?What
> is needed is a generic deferral or ability for drivers to declare
> dependences on other devices beyond their immediate parent.
>
> I've thought about this a bit on and off over the last year, but I
> haven't actually sat down to try and hack anything out yet.
Sounds like it needs to do for the kernel what systemd does for
userspace in my ears. And I wholeheartedly agree it needs
fixing.
A main concern would be that these dependencies are currently
implicit, Arjan did a great job on fixing some of it by
parallellizing initilization of drivers per initlevel and sync it at at
the end of each level, doing a clean dependecy resolution
would do away with all the initlevels eventually.
Yours,
Linus Walleij
prev parent reply other threads:[~2011-05-20 7:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 13:13 [PATCH 02/10] mach-u300: rewrite gpio driver, move to drivers/gpio Linus Walleij
2011-04-27 18:23 ` H Hartley Sweeten
2011-04-28 7:07 ` Linus Walleij
2011-04-28 7:10 ` Linus Walleij
2011-04-28 17:41 ` H Hartley Sweeten
2011-05-13 14:51 ` Linus Walleij
2011-05-19 8:56 ` Shawn Guo
2011-05-19 12:21 ` Linus Walleij
2011-05-19 13:56 ` Shawn Guo
2011-05-19 19:11 ` Sascha Hauer
2011-05-19 19:30 ` Nicolas Pitre
2011-05-20 3:18 ` Shawn Guo
2011-05-20 3:43 ` Kyungmin Park
2011-05-20 3:54 ` Nicolas Pitre
2011-05-19 21:18 ` H Hartley Sweeten
2011-05-20 1:50 ` Jamie Iles
2011-05-20 22:07 ` H Hartley Sweeten
2011-05-21 13:03 ` Jamie Iles
2011-05-20 7:01 ` Grant Likely
2011-05-20 7:47 ` Linus Walleij
[not found] ` <BANLkTi=poU17RqAzp28CPjWHrN_+aFiyag@mail.gmail.com>
2011-05-19 11:38 ` Barry Song
2011-05-19 12:25 ` Linus Walleij
2011-05-19 12:35 ` Barry Song
2011-05-19 13:17 ` Linus Walleij
2011-05-19 14:05 ` Barry Song
2011-05-20 6:58 ` Grant Likely
2011-05-20 6:52 ` Grant Likely
2011-05-20 7:46 ` Linus Walleij [this message]
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='BANLkTimMzEDm1wGu4TaYnsOQAu-e=90SAg@mail.gmail.com' \
--to=linus.walleij@linaro.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 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).