Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbdDDJJr (ORCPT ); Tue, 4 Apr 2017 05:09:47 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34336 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752461AbdDDJJq (ORCPT ); Tue, 4 Apr 2017 05:09:46 -0400 Date: Tue, 4 Apr 2017 11:09:39 +0200 From: Daniel Vetter To: Neil Armstrong Cc: airlied@linux.ie, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 03/13] drm/meson: Add support for components Message-ID: <20170404090939.tiozilv4zigmiglu@phenom.ffwll.local> Mail-Followup-To: Neil Armstrong , airlied@linux.ie, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org References: <1490109950-21421-1-git-send-email-narmstrong@baylibre.com> <1490109950-21421-4-git-send-email-narmstrong@baylibre.com> <20170404085931.7sv3k7lwgt6klu37@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.9.0-2-amd64 User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1232 Lines: 35 On Tue, Apr 04, 2017 at 11:08:26AM +0200, Neil Armstrong wrote: > On 04/04/2017 10:59 AM, Daniel Vetter wrote: > > On Tue, Mar 21, 2017 at 04:25:40PM +0100, Neil Armstrong wrote: > >> +static int meson_drv_probe(struct platform_device *pdev) > >> +{ > >> + struct component_match *match = NULL; > >> + struct device_node *np = pdev->dev.of_node; > >> + struct device_node *ep, *remote; > >> + int count = 0; > >> + > >> + for_each_endpoint_of_node(np, ep) { > >> + remote = of_graph_get_remote_port_parent(ep); > >> + if (!remote || !of_device_is_available(remote)) > >> + continue; > >> + > >> + count += meson_probe_remote(pdev, &match, np, remote); > >> + } > >> + > >> + /* If some endpoints were found, initialize the nodes */ > >> + if (count) { > > > > What if you have more than 1 endpoint described, but module load order > > conspires against you to only initialize 1 at first? > > As I understood, the component_bind_all() will fail until all modules are loaded > even in wrong order, no ? > I tested with multiple combinations and it worked like a charm... maybe I missed > something here ! I misread your code, looks all fine. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch