The pinctrl driver must finish before the gpio probe starts. This is
because as for now, the k1-x gpio driver doesn't handle deferred probe
correctly. It can be fixed by registering pinctrl-single in
postcore_initcall. This way the pinctrl will always finish before gpio
starts.
Ported from [1].
[1] - https://github.com/BPI-SINOVOIP/pi-linux.git
Change-Id: Ib748db78932829c0eaaf074e51a9603b7708c1d5
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
#endif
};
+
+#ifdef CONFIG_ARCH_SPACEMIT
+static int __init pcs_driver_init(void)
+{
+ return platform_driver_register(&pcs_driver);
+}
+postcore_initcall(pcs_driver_init);
+
+static void __exit pcs_driver_exit(void)
+{
+ platform_driver_unregister(&pcs_driver);
+}
+module_exit(pcs_driver_exit);
+#else
module_platform_driver(pcs_driver);
+#endif
MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");