summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-stm32.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-01-10 18:41:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-11 08:59:12 +0100
commit8a3aebad177962861103a7163203f8af059ef5d4 (patch)
treec58ee862bd0d6135aaf7b039eb8e6ea141ebd0e3 /drivers/pinctrl/pinctrl-stm32.c
parent484b12f6694dfa23d14a4db30971914e8b44fbf7 (diff)
downloadbarebox-8a3aebad177962861103a7163203f8af059ef5d4.tar.gz
barebox-8a3aebad177962861103a7163203f8af059ef5d4.tar.xz
pinctrl: stm32: fix pinctrl/gpio dependency ordering
pinctrl_register will apply pinctrl hogs if specified and the STM32 pinctrl driver expects the GPIO chips to be registered by then. Swap the order of registration to accommodate this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230110174104.51204-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/pinctrl/pinctrl-stm32.c')
-rw-r--r--drivers/pinctrl/pinctrl-stm32.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/pinctrl/pinctrl-stm32.c b/drivers/pinctrl/pinctrl-stm32.c
index fc0cc78f43..3b839e88d0 100644
--- a/drivers/pinctrl/pinctrl-stm32.c
+++ b/drivers/pinctrl/pinctrl-stm32.c
@@ -367,12 +367,6 @@ static int stm32_pinctrl_probe(struct device_d *dev)
dev_dbg(dev, "proceeding without hw spinlock support: (%d)\n",
ret);
- ret = pinctrl_register(&pinctrl->pdev);
- if (ret) {
- dev_dbg(dev, "pinctrl_register failed: (%d)\n", ret);
- return ret;
- }
-
gpio_bank = pinctrl->gpio_banks;
for_each_available_child_of_node(np, child) {
if (!of_property_read_bool(child, "gpio-controller"))
@@ -388,9 +382,7 @@ static int stm32_pinctrl_probe(struct device_d *dev)
gpio_bank++;
}
- dev_dbg(dev, "pinctrl/gpio driver registered\n");
-
- return 0;
+ return pinctrl_register(&pinctrl->pdev);
}
static __maybe_unused struct of_device_id stm32_pinctrl_dt_ids[] = {