linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl-zynq: Initialize early
@ 2015-10-22 11:30 Mike Looijmans
  2015-10-22 16:07 ` Sören Brinkmann
  2015-10-30  9:42 ` Linus Walleij
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Looijmans @ 2015-10-22 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

Supplying pinmux configuration for e.g. gpio pins leads to deferred
probes because the pinctrl device is probed much later than gpio.
Move the init call to a much earlier stage so it probes before the
devices that may need it.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 drivers/pinctrl/pinctrl-zynq.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
index fd4602d..36984f1 100644
--- a/drivers/pinctrl/pinctrl-zynq.c
+++ b/drivers/pinctrl/pinctrl-zynq.c
@@ -1173,7 +1173,17 @@ static struct platform_driver zynq_pinctrl_driver = {
 	.remove = zynq_pinctrl_remove,
 };
 
-module_platform_driver(zynq_pinctrl_driver);
+static int __init zynq_pinctrl_init(void)
+{
+	return platform_driver_register(&zynq_pinctrl_driver);
+}
+arch_initcall(zynq_pinctrl_init);
+
+static void __exit zynq_pinctrl_exit(void)
+{
+	platform_driver_unregister(&zynq_pinctrl_driver);
+}
+module_exit(zynq_pinctrl_exit);
 
 MODULE_AUTHOR("S??ren Brinkmann <soren.brinkmann@xilinx.com>");
 MODULE_DESCRIPTION("Xilinx Zynq pinctrl driver");
-- 
1.9.1

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

end of thread, other threads:[~2015-10-30  9:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22 11:30 [PATCH] pinctrl-zynq: Initialize early Mike Looijmans
2015-10-22 16:07 ` Sören Brinkmann
2015-10-23  5:31   ` Mike Looijmans
2015-10-23  5:43     ` Mike Looijmans
2015-10-23  5:48       ` Sören Brinkmann
2015-10-23  5:44     ` Sören Brinkmann
2015-10-29  9:00       ` Michal Simek
2015-10-30  9:42 ` Linus Walleij

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