From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/8] gpio: zynq: Shift zynq_gpio_init() to subsys_initcall level
Date: Tue, 22 Aug 2017 15:02:29 +0200 [thread overview]
Message-ID: <CACRpkdbgPYrSo3KcHuf6sCWT-s2R7UVMRhFagLT2-vB8S_MF0Q@mail.gmail.com> (raw)
In-Reply-To: <68cd52a7-ce87-a507-f02d-ccb99634b465@xilinx.com>
On Mon, Aug 14, 2017 at 4:15 PM, Michal Simek <michal.simek@xilinx.com> wrote:
>> Can't you just move it all the way to device_initcall and
>> simply use the standard module init macros?
>> builtin_platform_driver(), module_platform_driver()?
>
> When I grep the kernel I see this
>
> [linux](master)$ git grep "^core_initcall" drivers/gpio/ | wc -l
> 1
> [linux](master)$ git grep "^postcore_initcall" drivers/gpio/ | wc -l
> 12
> [linux](master)$ git grep "^arch_initcall" drivers/gpio/ | wc -l
> 2
> [linux](master)$ git grep "^subsys_initcall" drivers/gpio/ | wc -l
> 33
> [linux](master)$ git grep "^device_initcall" drivers/gpio/ | wc -l
> 4
>
>
> [linux](master)$ git grep "^core_initcall" drivers/pinctrl/ | wc -l
> 6
> [linux](master)$ git grep "^postcore_initcall" drivers/pinctrl/ | wc -l
> 7
> [linux](master)$ git grep "^arch_initcall" drivers/pinctrl/ | wc -l
> 62
> [linux](master)$ git grep "^subsys_initcall" drivers/pinctrl/ | wc -l
> 12
> [linux](master)$ git grep "^device_initcall" drivers/pinctrl/ | wc -l
> 0
>
> Majority of gpio drivers are in subsys_initcall and pinctrl in
> arch_initcall.
The majority is likely wrong, we don't vote about what is the
best code quality luckily :D
You do not see a lot of device_initicall because in the majority
of cases these come implicitly from module_platform_driver(),
builtin_platform_driver_probe() or builtin_platform_driver()
see include/linux/platform_device.h
> It doesn't mean that I have strong opinion about doing
> this change. I have also read internal tracking system and it is not
> fully clear if this is fixing any issue rather than removing on
> deferring probe message.
I think you can make it into module_platform_driver() please
try that approach.
Yours,
Linus Walleij
next prev parent reply other threads:[~2017-08-22 13:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 11:01 [PATCH 0/8] Zynq GPIO driver changes Michal Simek
2017-08-07 11:01 ` [PATCH 1/8] gpio: zynq: Add support for suspend resume Michal Simek
2017-08-14 13:44 ` Linus Walleij
2017-08-07 11:01 ` [PATCH 2/8] gpio: zynq: Wakeup gpio controller when it is used as IRQ controller Michal Simek
2017-08-14 13:53 ` Linus Walleij
2017-08-14 14:33 ` Michal Simek
2017-08-22 12:57 ` Linus Walleij
2019-01-07 15:42 ` Thomas Petazzoni
2019-01-08 13:21 ` Michal Simek
2019-01-11 9:54 ` Linus Walleij
2019-01-11 12:54 ` Thomas Petazzoni
2019-01-11 14:37 ` Linus Walleij
2019-01-21 6:11 ` Shubhrajyoti Datta
2017-08-07 11:01 ` [PATCH 3/8] gpio: zynq: Shift zynq_gpio_init() to subsys_initcall level Michal Simek
2017-08-14 13:55 ` Linus Walleij
2017-08-14 14:15 ` Michal Simek
2017-08-22 13:02 ` Linus Walleij [this message]
2017-08-07 11:01 ` [PATCH 4/8] gpio: zynq: Provided workaround for GPIO Michal Simek
2017-08-14 13:57 ` Linus Walleij
2017-08-14 14:01 ` Michal Simek
2017-08-07 11:01 ` [PATCH 5/8] gpio: zynq: Fix kernel doc warnings Michal Simek
2017-08-14 13:58 ` Linus Walleij
2017-08-07 11:01 ` [PATCH 6/8] gpio: zynq: Fix empty lines in driver Michal Simek
2017-08-14 13:59 ` Linus Walleij
2017-08-07 11:02 ` [PATCH 7/8] gpio: zynq: Fix warnings in the driver Michal Simek
2017-08-14 14:00 ` Linus Walleij
2017-08-07 11:02 ` [PATCH 8/8] gpio: zynq: Fix driver function parameters alignment Michal Simek
2017-08-14 14:01 ` Linus Walleij
2017-08-14 14:03 ` Michal Simek
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=CACRpkdbgPYrSo3KcHuf6sCWT-s2R7UVMRhFagLT2-vB8S_MF0Q@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).