From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751142AbdGNW6s (ORCPT ); Fri, 14 Jul 2017 18:58:48 -0400 Received: from anholt.net ([50.246.234.109]:37414 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbdGNW6r (ORCPT ); Fri, 14 Jul 2017 18:58:47 -0400 From: Eric Anholt To: Archit Taneja , dri-devel@lists.freedesktop.org, Andrzej Hajda , Laurent Pinchart , Thierry Reding Cc: linux-kernel@vger.kernel.org, Boris Brezillon Subject: Re: [PATCH 6/8] drm: Allow DSI devices to be registered before the host registers. In-Reply-To: <6fbaa797-1040-48e8-c361-dad4363cd30d@codeaurora.org> References: <20170627195839.3338-1-eric@anholt.net> <20170627195839.3338-7-eric@anholt.net> <6fbaa797-1040-48e8-c361-dad4363cd30d@codeaurora.org> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Fri, 14 Jul 2017 15:58:43 -0700 Message-ID: <87vamu7hi4.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Archit Taneja writes: > On 06/28/2017 01:28 AM, Eric Anholt wrote: >> When a mipi_dsi_host is registered, the DT is walked to find any child >> nodes with compatible strings. Those get registered as DSI devices, >> and most DSI panel drivers are mipi_dsi_drivers that attach to those nod= es. >>=20 >> There is one special case currently, the adv7533 bridge, where the >> bridge probes on I2C, and during the bridge attach step it looks up >> the mipi_dsi_host and registers the mipi_dsi_device (for its own stub >> mipi_dsi_driver). >>=20 >> For the Raspberry Pi panel, though, we also need to attach on I2C (our >> control bus), but don't have a bridge driver. The lack of a bridge's >> attach() step like adv7533 uses means that we aren't able to delay the >> mipi_dsi_device creation until the mipi_dsi_host is present. >>=20 >> To fix this, we extend mipi_dsi_device_register_full() to allow being >> called with a NULL host, which puts the device on a queue waiting for >> a host to appear. When a new host is registered, we fill in the host >> value and finish the device creation process. > > This is quite a nice idea. The only bothering thing is the info.of_node u= sage > varies between child nodes (mipi_dsi_devs) and non-child nodes (i2c contr= ol > bus). > > For DSI children expressed in DT, the of_node in info holds the DT node > corresponding to the DSI child itself. For non-DT ones, this patch assumes > that info.of_node stores the DSI host DT node. I think it should be okay = as > long as we mention the usage in a comment somewhere. The other option is = to > have a new info.host_node field to keep a track of the host DT node. I think maybe you misread the patch? We're using of_get_parent(dsi->dev.node), which came from info->node, to compare to host->dev->of_node(). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAllpTKMACgkQtdYpNtH8 nuijYRAAk5vVfq6nOjMMbLSK23/66wXTG+nYuhwW+DhAuyi/HPeNtCb42LuQze8t CGCXnQKKPfusDw8fWY0620L4ioQ0BpFewakomlbE3czsY5BKUzrJAKwLw4paKU6z Qmxd1fv3LjlW/3wiAaawSoIrmqAlUNv7HA6QZo+Tpn5IMMiBGpuaaOfISngI7r4/ /k23lH51kFZ1dmqE2kMVt8IEv23KywhZBB//deRARMMSP3RJGie9jLUE2x0ZUyCQ LOVPtN3vKmMoUqEQRVuV49hGpMalf0QslkgeHGCzAWS+o45aYTcHM5FT0z//jdUz iebNRwHKazxs+7DXgJf0i5HyA5eF7D54oIW//qHTBHy+S9Xh6Np4/2rUf167O3ZS soGyNsGXQX7jiMZ48cwe46XgBB8jcATnxSsKbmWapcha4Ncbmp5eSgK8IXvt8T0A zuLx88UF+Ra177cGPVKmNdqwzyKlKK/6WiSNs2foXseV5c3oPLwCE20gg6Xf4FY6 MBwOCRwpIbc2LXtfph3iD4iQjw1V43rLMNiZ3IOqICSkSG7v/GCCLxygNQcQ4wK2 4fJadqr5o82HEvzMnpNkq941slc7h5hVKeUZTf0Cf3I3b/cfzm1y/CN6vMcV0Enr 62Y1/jPimqLCs0t6mlBcdhnqdVXDitUhLlg0ubvJPN5Rq41HGJ4= =KELX -----END PGP SIGNATURE----- --=-=-=--