* [PATCH v2] can: m_can: Use of_property_present() for wakeup-source
@ 2026-05-12 10:25 phucduc.bui
2026-05-12 16:19 ` Kendall Willis
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-05-12 10:25 UTC (permalink / raw)
To: msp; +Cc: mkl, mailhol, k-willis, linux-can, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The 'wakeup-source' property is declared as a phandle-array in both YAML
bindings and Device Tree source files. However, the driver currently
uses of_property_read_bool() to check for its existence.
According to the function's documentation, usage on non-boolean property
types is deprecated. Switch to of_property_present() to comply with the
recommended API for checking the presence of a property.
Fixes: 04d5826b074e ("can: m_can: Map WoL to device_set_wakeup_enable")
Acked-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Changes in v2:
- Add Acked-by tag
- Add Fixes tag
drivers/net/can/m_can/m_can.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index eb856547ae7d..16f80607e150 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -2464,7 +2464,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev,
return ERR_PTR(ret);
}
- if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
+ if (dev->of_node && of_property_present(dev->of_node, "wakeup-source"))
device_set_wakeup_capable(dev, true);
/* Get TX FIFO size
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] can: m_can: Use of_property_present() for wakeup-source
2026-05-12 10:25 [PATCH v2] can: m_can: Use of_property_present() for wakeup-source phucduc.bui
@ 2026-05-12 16:19 ` Kendall Willis
0 siblings, 0 replies; 2+ messages in thread
From: Kendall Willis @ 2026-05-12 16:19 UTC (permalink / raw)
To: phucduc.bui; +Cc: msp, mkl, mailhol, linux-can, linux-kernel
On 17:25-20260512, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> The 'wakeup-source' property is declared as a phandle-array in both YAML
> bindings and Device Tree source files. However, the driver currently
> uses of_property_read_bool() to check for its existence.
>
> According to the function's documentation, usage on non-boolean property
> types is deprecated. Switch to of_property_present() to comply with the
> recommended API for checking the presence of a property.
>
> Fixes: 04d5826b074e ("can: m_can: Map WoL to device_set_wakeup_enable")
> Acked-by: Markus Schneider-Pargmann <msp@baylibre.com>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Kendall Willis <k-willis@ti.com>
> ---
>
> Changes in v2:
> - Add Acked-by tag
> - Add Fixes tag
>
> drivers/net/can/m_can/m_can.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index eb856547ae7d..16f80607e150 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -2464,7 +2464,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev,
> return ERR_PTR(ret);
> }
>
> - if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
> + if (dev->of_node && of_property_present(dev->of_node, "wakeup-source"))
> device_set_wakeup_capable(dev, true);
>
> /* Get TX FIFO size
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-12 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 10:25 [PATCH v2] can: m_can: Use of_property_present() for wakeup-source phucduc.bui
2026-05-12 16:19 ` Kendall Willis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox