[PATCH] of: platform: Use default match table for /firmware

Rob Herring (Arm) posted 1 patch 3 weeks, 4 days ago
drivers/of/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] of: platform: Use default match table for /firmware
Posted by Rob Herring (Arm) 3 weeks, 4 days ago
Calling of_platform_populate() without a match table will only populate
the immediate child nodes under /firmware. This is usually fine, but in
the case of something like a "simple-mfd" node such as
"raspberrypi,bcm2835-firmware", those child nodes will not be populated.
And subsequent calls won't work either because the /firmware node is
marked as processed already.

Switch the call to of_platform_default_populate() to solve this problem.
It should be a nop for existing cases.

Fixes: 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()")
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 drivers/of/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index d4e169b3b5af..d90b1677d84e 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -568,7 +568,7 @@ static int __init of_platform_default_populate_init(void)
 
 		node = of_find_node_by_path("/firmware");
 		if (node) {
-			of_platform_populate(node, NULL, NULL, NULL);
+			of_platform_default_populate(node, NULL, NULL);
 			of_node_put(node);
 		}
 
-- 
2.51.0
Re: [PATCH] of: platform: Use default match table for /firmware
Posted by Rob Herring 3 weeks, 1 day ago
On Tue, Jan 13, 2026 at 07:51:58PM -0600, Rob Herring (Arm) wrote:
> Calling of_platform_populate() without a match table will only populate
> the immediate child nodes under /firmware. This is usually fine, but in
> the case of something like a "simple-mfd" node such as
> "raspberrypi,bcm2835-firmware", those child nodes will not be populated.
> And subsequent calls won't work either because the /firmware node is
> marked as processed already.
> 
> Switch the call to of_platform_default_populate() to solve this problem.
> It should be a nop for existing cases.
> 
> Fixes: 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()")
> Cc: stable@vger.kernel.org
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  drivers/of/platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index d4e169b3b5af..d90b1677d84e 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -568,7 +568,7 @@ static int __init of_platform_default_populate_init(void)
>  
>  		node = of_find_node_by_path("/firmware");
>  		if (node) {
> -			of_platform_populate(node, NULL, NULL, NULL);
> +			of_platform_default_populate(node, NULL, NULL);
>  			of_node_put(node);
>  		}
>  
> -- 
> 2.51.0
>
Re: [PATCH] of: platform: Use default match table for /firmware
Posted by Sudeep Holla 3 weeks, 4 days ago
On Tue, Jan 13, 2026 at 07:51:58PM -0600, Rob Herring (Arm) wrote:
> Calling of_platform_populate() without a match table will only populate
> the immediate child nodes under /firmware. This is usually fine, but in
> the case of something like a "simple-mfd" node such as
> "raspberrypi,bcm2835-firmware", those child nodes will not be populated.
> And subsequent calls won't work either because the /firmware node is
> marked as processed already.
> 
> Switch the call to of_platform_default_populate() to solve this problem.
> It should be a nop for existing cases.
>

Thanks, had not thought of child nodes for sure at that time.

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep