Skip to content

Commit

Permalink
pinctrl: zynq: Initialize early
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Sören Brinkmann <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
MikeLooijmans authored and linusw committed Oct 30, 2015
1 parent d94b986 commit 13e3008
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/pinctrl/pinctrl-zynq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,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 <[email protected]>");
MODULE_DESCRIPTION("Xilinx Zynq pinctrl driver");
Expand Down

0 comments on commit 13e3008

Please sign in to comment.