linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] staging: imx-drm-core: skip components whose parent device is disabled
Date: Thu, 10 Apr 2014 10:55:51 +0200	[thread overview]
Message-ID: <1397120151.3226.11.camel@paszta.hi.pengutronix.de> (raw)
In-Reply-To: <1397112193-15817-1-git-send-email-shawn.guo@freescale.com>

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

      reply	other threads:[~2014-04-10  8:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397120151.3226.11.camel@paszta.hi.pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).