summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Moreau2024-07-30 14:20:20 +0000
committerRobert Marko2024-08-02 17:46:49 +0000
commit226af7a77cc7398b126267c66106c593a49d8ad2 (patch)
tree4877b9dfaa4e16348f4ddc9d0e0409fc4de5d8b1
parentca4469045f6a4845dbf8aeabd4b04b421209f66e (diff)
downloadopenwrt-226af7a77cc7398b126267c66106c593a49d8ad2.tar.gz
Revert "ath79: remove GPIO driver earlier registration hack"
This reverts commit f444dea428cdcafd78fb75004a942da24cabd48c. It seems that some devices using GPIO WDT have really short WDT timeouts and when using module_platform_driver registration it happens too late and thus WDT will timeout and reset the board. So, for now lets return the postcore_initcall hack for now. Fixes: f444dea428cd ("ath79: remove GPIO driver earlier registration hack") Signed-off-by: Joan Moreau <jom@grosjo.net> Link: https://github.com/openwrt/openwrt/pull/16035 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
new file mode 100644
index 0000000000..a3bdf890c4
--- /dev/null
+++ b/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
@@ -0,0 +1,26 @@
+From: John Crispin <john@phrozen.org>
+Subject: ath79: Register GPIO driver earlier
+
+HACK: register the GPIO driver earlier to ensure that gpio_request calls
+from mach files succeed.
+
+Submitted-by: John Crispin <john@phrozen.org>
+---
+ drivers/gpio/gpio-ath79.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-ath79.c
++++ b/drivers/gpio/gpio-ath79.c
+@@ -300,7 +300,11 @@ static struct platform_driver ath79_gpio
+ .probe = ath79_gpio_probe,
+ };
+
+-module_platform_driver(ath79_gpio_driver);
++static int __init ath79_gpio_init(void)
++{
++ return platform_driver_register(&ath79_gpio_driver);
++}
++postcore_initcall(ath79_gpio_init);
+
+ MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support");
+ MODULE_LICENSE("GPL v2");