linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: imx-drm-core: skip components whose parent device is disabled
@ 2014-04-14  2:02 Shawn Guo
  2014-04-14  8:01 ` Philipp Zabel
  2014-04-18 20:42 ` Russell King - ARM Linux
  0 siblings, 2 replies; 14+ messages in thread
From: Shawn Guo @ 2014-04-14  2:02 UTC (permalink / raw)
  To: linux-arm-kernel

In a board setup which disables LDB device node completely by changing
status to 'disabled', and only enables HDMI device, we're running into
the problem that imx-drm master never succeeds in binding, and hence
HDMI does not come up either.

&ldb {
	status = "disabled";

	lvds-channel at 1 {
		...
		status = "okay";
	};
};

The imx-drm-core should really skip the LVDS channels no matter what
lvds-channel's status is, if LDB device is disabled.  Let's consider
such setup a misconfiguration, give a warning in there and not add the
component.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
Changes since v1:
* Put a warning on such misconfiguration

 drivers/staging/imx-drm/imx-drm-core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index 4144a75..0da8a8a 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -675,6 +675,11 @@ static int imx_drm_platform_probe(struct platform_device *pdev)
 			if (!remote || !of_device_is_available(remote)) {
 				of_node_put(remote);
 				continue;
+			} else if (!of_device_is_available(remote->parent)) {
+				dev_warn(&pdev->dev, "parent device of %s is not available\n",
+					 remote->full_name);
+				of_node_put(remote);
+				continue;
 			}
 
 			ret = imx_drm_add_component(&pdev->dev, remote);
-- 
1.8.3.2

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

end of thread, other threads:[~2014-04-26 10:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14  2:02 [PATCH v2] staging: imx-drm-core: skip components whose parent device is disabled Shawn Guo
2014-04-14  8:01 ` Philipp Zabel
2014-04-18 20:42 ` Russell King - ARM Linux
2014-04-19  5:53   ` Shawn Guo
2014-04-19  8:42     ` Russell King - ARM Linux
2014-04-19 11:00       ` Shawn Guo
2014-04-21 14:22         ` Olof Johansson
2014-04-21 23:31           ` Shawn Guo
2014-04-22 20:49             ` Arnd Bergmann
2014-04-22 21:55               ` Russell King - ARM Linux
2014-04-23  7:44                 ` Shawn Guo
2014-04-23  9:00                   ` Russell King - ARM Linux
2014-04-24 21:36                     ` Arnd Bergmann
2014-04-26 10:20                       ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).