* [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
@ 2026-07-29 14:10 Christophe Leroy (CS GROUP)
2026-07-29 15:14 ` Bartosz Golaszewski
2026-07-29 15:21 ` Herve Codina
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-29 14:10 UTC (permalink / raw)
To: Christophe Leroy
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
Before commit 156460811def ("soc: fsl: qe: Change GPIO driver to a
proper platform driver") qe_add_gpiochips() was walking the device
tree to find all nodes with compatible "fsl,mpc8323-qe-pario-bank".
After that commit the discovery is handled by the platform core,
therefore it is necessary to call of_platform_default_populate() on
the par_io node.
Fixes: 156460811def ("soc: fsl: qe: Change GPIO driver to a proper platform driver")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
---
drivers/soc/fsl/qe/qe_io.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c
index a5e2d0e5ab51..02ca556c8db0 100644
--- a/drivers/soc/fsl/qe/qe_io.c
+++ b/drivers/soc/fsl/qe/qe_io.c
@@ -15,6 +15,7 @@
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/ioport.h>
+#include <linux/of_platform.h>
#include <asm/io.h>
#include <soc/fsl/qe/qe.h>
@@ -184,3 +185,17 @@ int par_io_of_config(struct device_node *np)
return 0;
}
EXPORT_SYMBOL(par_io_of_config);
+
+static int __init par_io_populate(void)
+{
+ struct device_node *np = of_find_node_by_name(NULL, "par_io");
+
+ if (!np)
+ return 0;
+
+ of_platform_default_populate(np, NULL, NULL);
+ of_node_put(np);
+
+ return 0;
+}
+arch_initcall(par_io_populate);
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-29 14:10 [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup Christophe Leroy (CS GROUP)
@ 2026-07-29 15:14 ` Bartosz Golaszewski
2026-07-29 15:21 ` Herve Codina
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-07-29 15:14 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
On Wed, 29 Jul 2026 16:10:36 +0200, "Christophe Leroy (CS GROUP)"
<chleroy@kernel.org> said:
> Before commit 156460811def ("soc: fsl: qe: Change GPIO driver to a
> proper platform driver") qe_add_gpiochips() was walking the device
> tree to find all nodes with compatible "fsl,mpc8323-qe-pario-bank".
>
> After that commit the discovery is handled by the platform core,
> therefore it is necessary to call of_platform_default_populate() on
> the par_io node.
>
> Fixes: 156460811def ("soc: fsl: qe: Change GPIO driver to a proper platform driver")
> Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-29 14:10 [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup Christophe Leroy (CS GROUP)
2026-07-29 15:14 ` Bartosz Golaszewski
@ 2026-07-29 15:21 ` Herve Codina
1 sibling, 0 replies; 3+ messages in thread
From: Herve Codina @ 2026-07-29 15:21 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Paul Louvel
Hi Christophe,
On Wed, 29 Jul 2026 16:10:36 +0200
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org> wrote:
> Before commit 156460811def ("soc: fsl: qe: Change GPIO driver to a
> proper platform driver") qe_add_gpiochips() was walking the device
> tree to find all nodes with compatible "fsl,mpc8323-qe-pario-bank".
>
> After that commit the discovery is handled by the platform core,
> therefore it is necessary to call of_platform_default_populate() on
> the par_io node.
>
> Fixes: 156460811def ("soc: fsl: qe: Change GPIO driver to a proper platform driver")
> Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
> ---
> drivers/soc/fsl/qe/qe_io.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c
> index a5e2d0e5ab51..02ca556c8db0 100644
> --- a/drivers/soc/fsl/qe/qe_io.c
> +++ b/drivers/soc/fsl/qe/qe_io.c
> @@ -15,6 +15,7 @@
> #include <linux/errno.h>
> #include <linux/module.h>
> #include <linux/ioport.h>
> +#include <linux/of_platform.h>
>
> #include <asm/io.h>
> #include <soc/fsl/qe/qe.h>
> @@ -184,3 +185,17 @@ int par_io_of_config(struct device_node *np)
> return 0;
> }
> EXPORT_SYMBOL(par_io_of_config);
> +
> +static int __init par_io_populate(void)
> +{
> + struct device_node *np = of_find_node_by_name(NULL, "par_io");
> +
> + if (!np)
> + return 0;
> +
> + of_platform_default_populate(np, NULL, NULL);
> + of_node_put(np);
> +
> + return 0;
> +}
> +arch_initcall(par_io_populate);
The par_io node is a sub-node of the soc@xxx node.
The soc@xxx node is simple-bus compatible. This child node should be
populated.
Why do we need this additional of_platform_default_populate?
Also par_io node has a compatible. Maybe the related driver should call
of_platform_populate() to populate children of par_io if needed. If this
driver is missing, maybe it should be created.
Do I miss something?
Best regards,
Hervé
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-29 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 14:10 [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup Christophe Leroy (CS GROUP)
2026-07-29 15:14 ` Bartosz Golaszewski
2026-07-29 15:21 ` Herve Codina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox