All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: Use presence checks for syscon props
@ 2026-06-12 21:49 Rob Herring (Arm)
  2026-06-22 17:56 ` Mathieu Poirier
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2026-06-12 21:49 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier; +Cc: linux-remoteproc, linux-kernel

The OMAP and Keystone remoteproc drivers only need to know whether
"ti,bootreg" and "ti,syscon-dev" are present before parsing them.
Reading those properties as booleans misrepresents their DT encoding.

Use of_property_present() for the presence tests and keep the existing
phandle parsing for the actual property values.

Assisted-by: Codex:gpt-5-5
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 drivers/remoteproc/keystone_remoteproc.c | 2 +-
 drivers/remoteproc/omap_remoteproc.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c
index e7fde5509786..83763d640c4e 100644
--- a/drivers/remoteproc/keystone_remoteproc.c
+++ b/drivers/remoteproc/keystone_remoteproc.c
@@ -317,7 +317,7 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev,
 	struct device_node *np = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
 
-	if (!of_property_read_bool(np, "ti,syscon-dev")) {
+	if (!of_property_present(np, "ti,syscon-dev")) {
 		dev_err(dev, "ti,syscon-dev property is absent\n");
 		return -EINVAL;
 	}
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index cb01354248af..6ed0f28edac9 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -1140,7 +1140,7 @@ static int omap_rproc_get_boot_data(struct platform_device *pdev,
 	if (!data)
 		return -ENODEV;
 
-	if (!of_property_read_bool(np, "ti,bootreg"))
+	if (!of_property_present(np, "ti,bootreg"))
 		return 0;
 
 	oproc->boot_data = devm_kzalloc(&pdev->dev, sizeof(*oproc->boot_data),
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] remoteproc: Use presence checks for syscon props
  2026-06-12 21:49 [PATCH] remoteproc: Use presence checks for syscon props Rob Herring (Arm)
@ 2026-06-22 17:56 ` Mathieu Poirier
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2026-06-22 17:56 UTC (permalink / raw)
  To: Rob Herring (Arm); +Cc: Bjorn Andersson, linux-remoteproc, linux-kernel

On Fri, Jun 12, 2026 at 04:49:58PM -0500, Rob Herring (Arm) wrote:
> The OMAP and Keystone remoteproc drivers only need to know whether
> "ti,bootreg" and "ti,syscon-dev" are present before parsing them.
> Reading those properties as booleans misrepresents their DT encoding.
> 
> Use of_property_present() for the presence tests and keep the existing
> phandle parsing for the actual property values.
> 
> Assisted-by: Codex:gpt-5-5
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  drivers/remoteproc/keystone_remoteproc.c | 2 +-
>  drivers/remoteproc/omap_remoteproc.c     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c
> index e7fde5509786..83763d640c4e 100644
> --- a/drivers/remoteproc/keystone_remoteproc.c
> +++ b/drivers/remoteproc/keystone_remoteproc.c
> @@ -317,7 +317,7 @@ static int keystone_rproc_of_get_dev_syscon(struct platform_device *pdev,
>  	struct device_node *np = pdev->dev.of_node;
>  	struct device *dev = &pdev->dev;
>  
> -	if (!of_property_read_bool(np, "ti,syscon-dev")) {
> +	if (!of_property_present(np, "ti,syscon-dev")) {
>  		dev_err(dev, "ti,syscon-dev property is absent\n");
>  		return -EINVAL;
>  	}
> diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
> index cb01354248af..6ed0f28edac9 100644
> --- a/drivers/remoteproc/omap_remoteproc.c
> +++ b/drivers/remoteproc/omap_remoteproc.c
> @@ -1140,7 +1140,7 @@ static int omap_rproc_get_boot_data(struct platform_device *pdev,
>  	if (!data)
>  		return -ENODEV;
>  
> -	if (!of_property_read_bool(np, "ti,bootreg"))
> +	if (!of_property_present(np, "ti,bootreg"))
>  		return 0;
>

I'll apply this when rc1 comes out next week.

Thanks,
Mathieu
  
>  	oproc->boot_data = devm_kzalloc(&pdev->dev, sizeof(*oproc->boot_data),
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-22 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 21:49 [PATCH] remoteproc: Use presence checks for syscon props Rob Herring (Arm)
2026-06-22 17:56 ` Mathieu Poirier

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.