linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: imx-drm-core: skip components whose parent device is disabled
@ 2014-04-10  6:43 Shawn Guo
  2014-04-10  8:55 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Guo @ 2014-04-10  6:43 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.  So let's give one
more check on parent device availability before add the component.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
 drivers/staging/imx-drm/imx-drm-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index 4144a75..e494ef9 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -672,7 +672,8 @@ static int imx_drm_platform_probe(struct platform_device *pdev)
 
 		for_each_child_of_node(port, ep) {
 			remote = of_graph_get_remote_port_parent(ep);
-			if (!remote || !of_device_is_available(remote)) {
+			if (!remote || !of_device_is_available(remote) ||
+			    !of_device_is_available(remote->parent)) {
 				of_node_put(remote);
 				continue;
 			}
-- 
1.8.3.2

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

* [PATCH] staging: imx-drm-core: skip components whose parent device is disabled
  2014-04-10  6:43 [PATCH] staging: imx-drm-core: skip components whose parent device is disabled Shawn Guo
@ 2014-04-10  8:55 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2014-04-10  8:55 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 10.04.2014, 14:43 +0800 schrieb Shawn Guo:
> 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";
> 	};
> };

I'd say this is a misconfiguration. Should we add a warning for this
case?

> The imx-drm-core should really skip the LVDS channels no matter what
> lvds-channel's status is, if LDB device is disabled.  So let's give one
> more check on parent device availability before add the component.
> 
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
>  drivers/staging/imx-drm/imx-drm-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
> index 4144a75..e494ef9 100644
> --- a/drivers/staging/imx-drm/imx-drm-core.c
> +++ b/drivers/staging/imx-drm/imx-drm-core.c
> @@ -672,7 +672,8 @@ static int imx_drm_platform_probe(struct platform_device *pdev)
>  
>  		for_each_child_of_node(port, ep) {
>  			remote = of_graph_get_remote_port_parent(ep);
> -			if (!remote || !of_device_is_available(remote)) {
> +			if (!remote || !of_device_is_available(remote) ||
> +			    !of_device_is_available(remote->parent)) {
>  				of_node_put(remote);
>  				continue;
>  			}

regards
Philipp

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10  6:43 [PATCH] staging: imx-drm-core: skip components whose parent device is disabled Shawn Guo
2014-04-10  8:55 ` Philipp Zabel

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).