devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>,
	Grant Likely <grant.likely@linaro.org>,
	Sean Paul <seanpaul@chromium.org>,
	Inki Dae <inki.dae@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH v3 02/12] drm/mipi_dsi: create dsi devices only for nodes with reg property
Date: Fri, 28 Mar 2014 12:52:37 +0100	[thread overview]
Message-ID: <1396007567-4015-3-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1396007567-4015-1-git-send-email-a.hajda@samsung.com>

MIPI DSI host node can contain child nodes which are not DSI devices.
Checking for existence of reg property can be used to distinguish such nodes.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/drm_mipi_dsi.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index b155ee2..09821f4 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -142,8 +142,12 @@ int mipi_dsi_host_register(struct mipi_dsi_host *host)
 {
 	struct device_node *node;
 
-	for_each_available_child_of_node(host->dev->of_node, node)
+	for_each_available_child_of_node(host->dev->of_node, node) {
+		/* skip nodes without reg property */
+		if (!of_find_property(node, "reg", NULL))
+			continue;
 		of_mipi_dsi_device_add(host, node);
+	}
 
 	return 0;
 }
-- 
1.8.3.2

  parent reply	other threads:[~2014-03-28 11:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 11:52 [PATCH v3 00/12] Add DSI display support for Exynos based boards Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 01/12] drm/mipi_dsi: add flags to DSI messages Andrzej Hajda
2014-03-28 11:52 ` Andrzej Hajda [this message]
2014-03-28 11:52 ` [PATCH v3 03/12] drm/exynos: disallow fbdev initialization if no device is connected Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 04/12] exynos/dsim: add DT bindings Andrzej Hajda
     [not found] ` <1396007567-4015-1-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-28 11:52   ` [PATCH v3 05/12] drm/exynos: add DSIM driver Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 06/12] panel/s6e8aa0: add DT bindings Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 07/12] drm/panel: add S6E8AA0 driver Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 08/12] ARM: dts: exynos4: add MIPI DSI Master node Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 09/12] ARM: dts: exynos4210-trats: add panel node Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 10/12] ARM: dts: exynos4412-trats2: " Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 11/12] ARM: dts: exynos4210-trats: enable exynos/fimd node Andrzej Hajda
2014-03-28 11:52 ` [PATCH v3 12/12] ARM: dts: exynos4412-trats2: " Andrzej Hajda
2014-04-01 12:29 ` [PATCH v3 00/12] Add DSI display support for Exynos based boards Inki Dae
     [not found]   ` <CAAQKjZN7u1q6jeLCyQ0qe7VDRY3wUv1PjUeZZ6uoWYjo7vdtZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-02  7:24     ` Andrzej Hajda
2014-04-03  6:54       ` Inki Dae

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=1396007567-4015-3-git-send-email-a.hajda@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=seanpaul@chromium.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).