mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: Mark the of_node of the aux bridge device as reused
@ 2024-10-17 15:35 Abel Vesa
  2024-10-17 16:18 ` Johan Hovold
  0 siblings, 1 reply; 2+ messages in thread
From: Abel Vesa @ 2024-10-17 15:35 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: Johan Hovold, Dmitry Baryshkov, dri-devel, linux-kernel, Abel Vesa

There are some cases where sharing the of_node renders different resources
providers confused about the same resource being shared by two different
devices. Avoid that by marking the of_node as reused since the aux bridge
device is reusing the parent of_node.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/gpu/drm/bridge/aux-bridge.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/aux-bridge.c
index b29980f95379ec7af873ed6e0fb79a9abb663c7b..ec3299ae49d6abdb75ee98acfe0682f1acc459f8 100644
--- a/drivers/gpu/drm/bridge/aux-bridge.c
+++ b/drivers/gpu/drm/bridge/aux-bridge.c
@@ -60,6 +60,7 @@ int drm_aux_bridge_register(struct device *parent)
 	adev->dev.parent = parent;
 	adev->dev.of_node = of_node_get(parent->of_node);
 	adev->dev.release = drm_aux_bridge_release;
+	adev->dev.of_node_reused = true;
 
 	ret = auxiliary_device_init(adev);
 	if (ret) {

---
base-commit: d61a00525464bfc5fe92c6ad713350988e492b88
change-id: 20241017-drm-aux-bridge-mark-of-node-reused-5c2ee740ff19

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>


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

* Re: [PATCH] drm/bridge: Mark the of_node of the aux bridge device as reused
  2024-10-17 15:35 [PATCH] drm/bridge: Mark the of_node of the aux bridge device as reused Abel Vesa
@ 2024-10-17 16:18 ` Johan Hovold
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2024-10-17 16:18 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Dmitry Baryshkov,
	dri-devel, linux-kernel

On Thu, Oct 17, 2024 at 06:35:26PM +0300, Abel Vesa wrote:
> There are some cases where sharing the of_node renders different resources
> providers confused about the same resource being shared by two different
> devices.

Can you be more specific about what type of issue you are trying to
avoid here? Is it due to pinctrl for example?

> Avoid that by marking the of_node as reused since the aux bridge
> device is reusing the parent of_node.
>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
>  drivers/gpu/drm/bridge/aux-bridge.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/aux-bridge.c
> index b29980f95379ec7af873ed6e0fb79a9abb663c7b..ec3299ae49d6abdb75ee98acfe0682f1acc459f8 100644
> --- a/drivers/gpu/drm/bridge/aux-bridge.c
> +++ b/drivers/gpu/drm/bridge/aux-bridge.c
> @@ -60,6 +60,7 @@ int drm_aux_bridge_register(struct device *parent)
>  	adev->dev.parent = parent;
>  	adev->dev.of_node = of_node_get(parent->of_node);
>  	adev->dev.release = drm_aux_bridge_release;
> +	adev->dev.of_node_reused = true;

Please use the intended device_set_of_node_from_dev() helper for this.
  
>  	ret = auxiliary_device_init(adev);
>  	if (ret) {

Johan

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

end of thread, other threads:[~2024-10-17 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-17 15:35 [PATCH] drm/bridge: Mark the of_node of the aux bridge device as reused Abel Vesa
2024-10-17 16:18 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®