* [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
@ 2026-07-30 12:27 ` Christophe Leroy (CS GROUP)
0 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:27 ` Christophe Leroy (CS GROUP)
(?)
@ 2026-07-29 15:14 ` Bartosz Golaszewski
-1 siblings, 0 replies; 15+ 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] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:27 ` Christophe Leroy (CS GROUP)
(?)
(?)
@ 2026-07-29 15:21 ` Herve Codina
2026-07-30 8:11 ` Christophe Leroy (CS GROUP)
-1 siblings, 1 reply; 15+ 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] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-29 15:21 ` Herve Codina
@ 2026-07-30 8:11 ` Christophe Leroy (CS GROUP)
2026-07-30 9:29 ` Herve Codina
0 siblings, 1 reply; 15+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-30 8:11 UTC (permalink / raw)
To: Herve Codina
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Paul Louvel
Hi Hervé,
Le 29/07/2026 à 17:21, Herve Codina a écrit :
> 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?
As discussed together off-line, at the time being the par_io driver is
not a platform driver. par_io_init() is called from setup_arch() by some
board setups.
In order to fix the regression, I keep it minimal with an
arch_initcall() function which is equivalent to what we had before
changing this driver to a platform driver. It will also ease applying
the fix to stable without too much churn.
It will still be possible to rework par_io driver in a follow-up patch
and change it to a propoer platform driver.
Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:27 ` Christophe Leroy (CS GROUP)
` (2 preceding siblings ...)
(?)
@ 2026-07-30 8:14 ` Christophe Leroy (CS GROUP)
2026-07-30 11:15 ` Krzysztof Kozlowski
-1 siblings, 1 reply; 15+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-30 8: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) 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.
>
> [...]
Applied, thanks!
[1/1] soc: fsl: qe: properly scan GPIO nodes at startup
commit: cf91e5909e620b77164b53c9b316a5c1f11f9ea7
Best regards,
--
Christophe Leroy (CS GROUP) <chleroy@kernel.org>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 8:11 ` Christophe Leroy (CS GROUP)
@ 2026-07-30 9:29 ` Herve Codina
0 siblings, 0 replies; 15+ messages in thread
From: Herve Codina @ 2026-07-30 9:29 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Paul Louvel
Hi Christophe,
On Thu, 30 Jul 2026 10:11:29 +0200
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org> wrote:
> Hi Hervé,
>
> Le 29/07/2026 à 17:21, Herve Codina a écrit :
> > 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?
>
> As discussed together off-line, at the time being the par_io driver is
> not a platform driver. par_io_init() is called from setup_arch() by some
> board setups.
>
> In order to fix the regression, I keep it minimal with an
> arch_initcall() function which is equivalent to what we had before
> changing this driver to a platform driver. It will also ease applying
> the fix to stable without too much churn.
>
> It will still be possible to rework par_io driver in a follow-up patch
> and change it to a propoer platform driver.
>
Yes, indeed, this makes sense.
Thanks for the clarification.
Best regards,
Hervé
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:27 ` Christophe Leroy (CS GROUP)
` (3 preceding siblings ...)
(?)
@ 2026-07-30 11:14 ` Krzysztof Kozlowski
2026-07-30 12:01 ` Christophe Leroy (CS GROUP)
-1 siblings, 1 reply; 15+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-30 11:14 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
On 29/07/2026 16:10, Christophe Leroy (CS GROUP) 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");
No, node name must not be ABI. Especially wrong node name.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 8:14 ` Christophe Leroy (CS GROUP)
@ 2026-07-30 11:15 ` Krzysztof Kozlowski
2026-07-30 12:04 ` Christophe Leroy (CS GROUP)
2026-07-30 12:09 ` Bartosz Golaszewski
0 siblings, 2 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-30 11:15 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
On 30/07/2026 10:14, Christophe Leroy (CS GROUP) wrote:
>
> On Wed, 29 Jul 2026 16:10:36 +0200, Christophe Leroy (CS GROUP) 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.
>>
>> [...]
>
> Applied, thanks!
>
> [1/1] soc: fsl: qe: properly scan GPIO nodes at startup
> commit: cf91e5909e620b77164b53c9b316a5c1f11f9ea7
You left very little time to respond to this - one day - and introduced
undocumented disallowed ABI. Please drop the patch. I will be objecting
to the entire pull request.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 11:14 ` Krzysztof Kozlowski
@ 2026-07-30 12:01 ` Christophe Leroy (CS GROUP)
2026-07-30 12:05 ` Krzysztof Kozlowski
0 siblings, 1 reply; 15+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-30 12:01 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
Le 30/07/2026 à 13:14, Krzysztof Kozlowski a écrit :
> On 29/07/2026 16:10, Christophe Leroy (CS GROUP) 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");
>
> No, node name must not be ABI. Especially wrong node name.
What's wrong with the node name ?
Regardless, I messed it up, I wanted to use type but copy/pasted
of_find_node_by_name(NULL, "par_io") from quirk_mpc8360e_qe_enet10() in
arch/powerpc/platforms/83xx/km83xx.c instead.
Is it OK to use of_find_node_by_type(NULL, "par_io") instead ?
We have:
$ git grep par_io arch/powerpc/boot/dts/
arch/powerpc/boot/dts/fsl/mpc8568mds.dts: par_io@e0100 {
arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi: par_io@e0100 {
arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi: device_type =
"par_io";
arch/powerpc/boot/dts/fsl/mpc8569mds.dts: par_io@e0100 {
arch/powerpc/boot/dts/fsl/mpc8569si-post.dtsi: par_io@e0100 {
arch/powerpc/boot/dts/fsl/mpc8569si-post.dtsi: device_type =
"par_io";
arch/powerpc/boot/dts/fsl/p1021mds.dts: par_io@e0100 {
arch/powerpc/boot/dts/fsl/p1021mds.dts: device_type =
"par_io";
arch/powerpc/boot/dts/fsl/p1025rdb.dtsi: par_io@e0100 {
arch/powerpc/boot/dts/fsl/p1025rdb.dtsi: device_type =
"par_io";
arch/powerpc/boot/dts/fsl/p1025twr.dtsi: par_io@e0100 {
arch/powerpc/boot/dts/fsl/p1025twr.dtsi: device_type =
"par_io";
arch/powerpc/boot/dts/kmeter1.dts: par_io@1400 {
arch/powerpc/boot/dts/kmeter1.dts: compatible =
"fsl,mpc8360-par_io";
arch/powerpc/boot/dts/mpc832x_rdb.dts: par_io@1400 {
arch/powerpc/boot/dts/mpc832x_rdb.dts: device_type =
"par_io";
Thanks
Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 11:15 ` Krzysztof Kozlowski
@ 2026-07-30 12:04 ` Christophe Leroy (CS GROUP)
2026-07-30 12:09 ` Bartosz Golaszewski
1 sibling, 0 replies; 15+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-30 12:04 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
Hi Krzysztof,
Le 30/07/2026 à 13:15, Krzysztof Kozlowski a écrit :
> On 30/07/2026 10:14, Christophe Leroy (CS GROUP) wrote:
>>
>> On Wed, 29 Jul 2026 16:10:36 +0200, Christophe Leroy (CS GROUP) 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.
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [1/1] soc: fsl: qe: properly scan GPIO nodes at startup
>> commit: cf91e5909e620b77164b53c9b316a5c1f11f9ea7
>
> You left very little time to respond to this - one day - and introduced
> undocumented disallowed ABI. Please drop the patch. I will be objecting
> to the entire pull request.
Yes sorry for that, I thought the reviewed-by: GPIO maintainer +
discussion with Herve was enough.
I'll fix it up before sending pull request. Thanks for reviewing and
providing feedback.
Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:01 ` Christophe Leroy (CS GROUP)
@ 2026-07-30 12:05 ` Krzysztof Kozlowski
2026-07-30 12:14 ` Christophe Leroy (CS GROUP)
0 siblings, 1 reply; 15+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-30 12:05 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
On 30/07/2026 14:01, Christophe Leroy (CS GROUP) wrote:
>
>
> Le 30/07/2026 à 13:14, Krzysztof Kozlowski a écrit :
>> On 29/07/2026 16:10, Christophe Leroy (CS GROUP) 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");
>>
>> No, node name must not be ABI. Especially wrong node name.
>
> What's wrong with the node name ?
1. It causes W=2 warnings (which we might move to W=1 at some point)
2. It is not generic and DT spec asks for generic node names, although
maybe this part of code follows more of ePAPR than DT. But ePAPR v1.1
also was asking for generic node names.
>
> Regardless, I messed it up, I wanted to use type but copy/pasted
> of_find_node_by_name(NULL, "par_io") from quirk_mpc8360e_qe_enet10() in
> arch/powerpc/platforms/83xx/km83xx.c instead.
>
> Is it OK to use of_find_node_by_type(NULL, "par_io") instead ?
Well, depends. Is it a documented ABI?
>
> We have:
>
> $ git grep par_io arch/powerpc/boot/dts/
> arch/powerpc/boot/dts/fsl/mpc8568mds.dts: par_io@e0100 {
> arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi: par_io@e0100 {
> arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi: device_type =
> "par_io";
These are all DTS, does not matter really. ABI is not documented via DTS
but bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 11:15 ` Krzysztof Kozlowski
2026-07-30 12:04 ` Christophe Leroy (CS GROUP)
@ 2026-07-30 12:09 ` Bartosz Golaszewski
1 sibling, 0 replies; 15+ messages in thread
From: Bartosz Golaszewski @ 2026-07-30 12:09 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel, Christophe Leroy (CS GROUP)
On Thu, 30 Jul 2026 13:15:25 +0200, Krzysztof Kozlowski <krzk@kernel.org> said:
> On 30/07/2026 10:14, Christophe Leroy (CS GROUP) wrote:
>>
>> On Wed, 29 Jul 2026 16:10:36 +0200, Christophe Leroy (CS GROUP) 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.
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [1/1] soc: fsl: qe: properly scan GPIO nodes at startup
>> commit: cf91e5909e620b77164b53c9b316a5c1f11f9ea7
>
> You left very little time to respond to this - one day - and introduced
> undocumented disallowed ABI. Please drop the patch. I will be objecting
> to the entire pull request.
>
Hi,
Krzysztof explained to me what to watch out for in such patches. In this case
it's about an undocumented node name which now becomes ABI. I'm of course
retracting my R-b.
Thanks,
Bartosz
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:05 ` Krzysztof Kozlowski
@ 2026-07-30 12:14 ` Christophe Leroy (CS GROUP)
2026-07-30 12:15 ` Krzysztof Kozlowski
0 siblings, 1 reply; 15+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-30 12:14 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
Le 30/07/2026 à 14:05, Krzysztof Kozlowski a écrit :
> On 30/07/2026 14:01, Christophe Leroy (CS GROUP) wrote:
>>
>>
>> Le 30/07/2026 à 13:14, Krzysztof Kozlowski a écrit :
>>> On 29/07/2026 16:10, Christophe Leroy (CS GROUP) 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");
>>>
>>> No, node name must not be ABI. Especially wrong node name.
>>
>> What's wrong with the node name ?
>
> 1. It causes W=2 warnings (which we might move to W=1 at some point)
> 2. It is not generic and DT spec asks for generic node names, although
> maybe this part of code follows more of ePAPR than DT. But ePAPR v1.1
> also was asking for generic node names.
>
>>
>> Regardless, I messed it up, I wanted to use type but copy/pasted
>> of_find_node_by_name(NULL, "par_io") from quirk_mpc8360e_qe_enet10() in
>> arch/powerpc/platforms/83xx/km83xx.c instead.
>>
>> Is it OK to use of_find_node_by_type(NULL, "par_io") instead ?
>
> Well, depends. Is it a documented ABI?
In Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/par_io.txt:
Required properties:
- device_type : should be "par_io".
- reg : offset to the register set and its length.
- num-ports : number of Parallel I/O ports
Example:
par_io@1400 {
reg = <1400 100>;
#address-cells = <1>;
#size-cells = <0>;
device_type = "par_io";
num-ports = <7>;
ucc_pin@1 {
......
};
Is it OK ?
Thanks,
Christophe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
2026-07-30 12:14 ` Christophe Leroy (CS GROUP)
@ 2026-07-30 12:15 ` Krzysztof Kozlowski
0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-30 12:15 UTC (permalink / raw)
To: Christophe Leroy (CS GROUP)
Cc: linuxppc-dev, linux-arm-kernel, linux-kernel, Bartosz Golaszewski,
Herve Codina, Paul Louvel
On 30/07/2026 14:14, Christophe Leroy (CS GROUP) wrote:
>> Well, depends. Is it a documented ABI?
>
> In Documentation/devicetree/bindings/soc/fsl/cpm_qe/qe/par_io.txt:
>
> Required properties:
> - device_type : should be "par_io".
> - reg : offset to the register set and its length.
> - num-ports : number of Parallel I/O ports
>
> Example:
> par_io@1400 {
> reg = <1400 100>;
> #address-cells = <1>;
> #size-cells = <0>;
> device_type = "par_io";
> num-ports = <7>;
> ucc_pin@1 {
> ......
> };
>
> Is it OK ?
Yes, this is fine.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] soc: fsl: qe: properly scan GPIO nodes at startup
@ 2026-07-30 12:27 ` Christophe Leroy (CS GROUP)
0 siblings, 0 replies; 15+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-07-30 12:27 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] 15+ messages in thread
end of thread, other threads:[~2026-07-30 12:27 UTC | newest]
Thread overview: 15+ 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-30 12:27 ` Christophe Leroy (CS GROUP)
2026-07-29 15:14 ` Bartosz Golaszewski
2026-07-29 15:21 ` Herve Codina
2026-07-30 8:11 ` Christophe Leroy (CS GROUP)
2026-07-30 9:29 ` Herve Codina
2026-07-30 8:14 ` Christophe Leroy (CS GROUP)
2026-07-30 11:15 ` Krzysztof Kozlowski
2026-07-30 12:04 ` Christophe Leroy (CS GROUP)
2026-07-30 12:09 ` Bartosz Golaszewski
2026-07-30 11:14 ` Krzysztof Kozlowski
2026-07-30 12:01 ` Christophe Leroy (CS GROUP)
2026-07-30 12:05 ` Krzysztof Kozlowski
2026-07-30 12:14 ` Christophe Leroy (CS GROUP)
2026-07-30 12:15 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.