public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge
@ 2024-10-18 12:49 Abel Vesa
  2024-10-18 15:43 ` Dmitry Baryshkov
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Abel Vesa @ 2024-10-18 12:49 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, stable,
	Abel Vesa

The assignment of the of_node to the aux bridge needs to mark the
of_node as reused as well, otherwise resource providers like pinctrl will
report a gpio as already requested by a different device when both pinconf
and gpios property are present.
Fix that by using the device_set_of_node_from_dev() helper instead.

Fixes: 6914968a0b52 ("drm/bridge: properly refcount DT nodes in aux bridge drivers")
Cc: stable@vger.kernel.org      # 6.8
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
Changes in v2:
- Re-worded commit to be more explicit of what it fixes, as Johan suggested
- Used device_set_of_node_from_dev() helper, as per Johan's suggestion
- Added Fixes tag and cc'ed stable
- Link to v1: https://lore.kernel.org/r/20241017-drm-aux-bridge-mark-of-node-reused-v1-1-7cd5702bb4f2@linaro.org
---
 drivers/gpu/drm/bridge/aux-bridge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/aux-bridge.c
index b29980f95379ec7af873ed6e0fb79a9abb663c7b..295e9d031e2dc86cbfd2a7350718fca181c99487 100644
--- a/drivers/gpu/drm/bridge/aux-bridge.c
+++ b/drivers/gpu/drm/bridge/aux-bridge.c
@@ -58,9 +58,10 @@ int drm_aux_bridge_register(struct device *parent)
 	adev->id = ret;
 	adev->name = "aux_bridge";
 	adev->dev.parent = parent;
-	adev->dev.of_node = of_node_get(parent->of_node);
 	adev->dev.release = drm_aux_bridge_release;
 
+	device_set_of_node_from_dev(&adev->dev, parent);
+
 	ret = auxiliary_device_init(adev);
 	if (ret) {
 		ida_free(&drm_aux_bridge_ida, adev->id);

---
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 related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-11-01 14:43 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 12:49 [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge Abel Vesa
2024-10-18 15:43 ` Dmitry Baryshkov
2024-10-30 16:45   ` Sui Jingfeng
2024-10-30 19:39     ` Laurent Pinchart
2024-10-31 12:29     ` Neil Armstrong
2024-10-21  7:12 ` Neil Armstrong
2024-10-21  7:23 ` Johan Hovold
2024-10-31 14:05   ` Johan Hovold
2024-10-31 16:13     ` Abel Vesa
2024-10-31 16:33       ` Johan Hovold
2024-11-01  9:49         ` Abel Vesa
2024-10-31 15:48   ` Dmitry Baryshkov
2024-10-31 16:26     ` Johan Hovold
2024-10-21 13:08 ` Neil Armstrong
2024-10-30 14:49   ` Sui Jingfeng
2024-10-31 12:31     ` Neil Armstrong
2024-10-31 14:02       ` Johan Hovold
2024-10-31 15:31         ` Sui Jingfeng
2024-10-31 15:06       ` Sui Jingfeng
2024-10-31 16:23         ` Johan Hovold
2024-11-01  3:49           ` Sui Jingfeng
2024-11-01  7:27             ` Johan Hovold
2024-11-01  9:20             ` Laurent Pinchart
2024-11-01 10:27               ` Dmitry Baryshkov
2024-11-01 14:43                 ` Laurent Pinchart
2024-11-01  6:15       ` Sui Jingfeng

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