linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: Rob Clark <robdclark@gmail.com>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Linux Fbdev development list" <linux-fbdev@vger.kernel.org>,
	linux-usb@vger.kernel.org, linux-pwm@vger.kernel.org,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org,
	"moderated list:ARM/S5P EXYNOS AR..."
	<linux-samsung-soc@vger.kernel.org>,
	"Grant Likely" <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-pm@vger.kernel.org, linux-gpio@vger.kernel.org,
	"Rob Herring" <robh+dt@kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Stéphane Marchesin" <stephane.marchesin@gmail.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 00/21] On-demand device registration
Date: Thu, 04 Jun 2015 23:03:46 +0200	[thread overview]
Message-ID: <5570BD32.9020705@ahsoftware.de> (raw)
In-Reply-To: <CAF6AEGuOP-3sxDQcNOjVmfP4ue6LmY7KFrj9W75aHKuvZpTFMw@mail.gmail.com>

Am 03.06.2015 um 23:12 schrieb Rob Clark:
> On Mon, May 25, 2015 at 10:53 AM, Tomeu Vizoso
> <tomeu.vizoso@collabora.com> wrote:
>> Hello,
>>
>> I have a problem with the panel on my Tegra Chromebook taking longer than
>> expected to be ready during boot (Stéphane Marchesin reported what is
>> basically the same issue in [0]), and have looked into ordered probing as a
>> better way of solving this than moving nodes around in the DT or playing with
>> initcall levels.
>>
>> While reading the thread [1] that Alexander Holler started with his series to
>> make probing order deterministic, it occurred to me that it should be possible
>> to achieve the same by registering devices as they are referenced by other
>> devices.
>>
>> This basically reuses the information that is already implicit in the probe()
>> implementations, saving us from refactoring existing drivers or adding
>> information to DTBs.
>>
>> Something I'm not completely happy with is that I have had to move the call to
>> of_platform_populate after all platform drivers have been registered.
>> Otherwise I don't see how I could register drivers on demand as we don't have
>> yet each driver's compatible strings.
>>
>> For machs that don't move of_platform_populate() to a later point, these
>> patches shouldn't cause any problems but it's not guaranteed that we'll avoid
>> all the deferred probes as some drivers may not be registered yet.
>>
>> I have tested this on boards with Tegra, iMX.6 and Exynos SoCs, and these
>> patches were enough to eliminate all the deferred probes.
>>
>> With this series I get the kernel to output to the panel in 0.5s, instead of 2.8s.
> 
> So, complete drive-by comment (and I won't claim to be a DT expert,
> etc, etc, so take this with a few grains of salt), but why not push
> the problem to the DT compiler (or a pre-process step that could be
> run on existing DT blobs), which generates an optional DT node that is
> the recommended probe order?  That seems like it avoids adding
> complexity into the early boot code (which seems like a good thing)..

I've played with that approach too (as my patches for dtc do contain the
same code I've put into the kernel, but decided that it doesn't make
much sense. The sort algorithm is really small (some dozen lines), very
fast (around 3-5ms on a omap) and might be later used to sort necessary
module loading too. So there would be no advantage to put a sorted list
into the DT. And having the sort algorithm in the kernel, would make it
possible to use it for acpi or something else too, if they manage it to
provide the necessary dependencies.

Regards,

Alexander Holler

      reply	other threads:[~2015-06-04 21:03 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 14:53 [PATCH 00/21] On-demand device registration Tomeu Vizoso
2015-05-25 14:53 ` [PATCH 08/21] gpio: Probe GPIO drivers on demand Tomeu Vizoso
2015-05-25 14:53 ` [PATCH 09/21] gpio: Probe pinctrl devices " Tomeu Vizoso
2015-05-25 14:53 ` [PATCH 18/21] pinctrl: " Tomeu Vizoso
2015-05-28  4:33 ` [PATCH 00/21] On-demand device registration Rob Herring
     [not found]   ` <CAL_Jsq+EWLEJhRudTGAwYsOg4tX2-pGhygeQGHae9RL8rBpMiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-03 19:57     ` Grygorii.Strashko-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
2015-06-04  8:39       ` Tomeu Vizoso
2015-06-04 16:51         ` Grygorii.Strashko@linaro.org
     [not found]       ` <556F5C24.1030101-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-06-04 20:39         ` Alexander Holler
2015-06-08 12:26           ` Enrico Weigelt, metux IT consult
2015-06-08 18:14             ` Alexander Holler
2015-06-08 18:18               ` Alexander Holler
2015-06-22 15:23   ` Tomeu Vizoso
2015-06-23  0:01     ` Rob Herring
2015-06-02  8:48 ` Linus Walleij
2015-06-02 10:14   ` Tomeu Vizoso
2015-06-10  7:30     ` Linus Walleij
2015-06-10  8:28       ` Alexander Holler
2015-06-11  8:12         ` Linus Walleij
2015-06-11 10:17           ` Alexander Holler
     [not found]             ` <5579602F.1070801-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-06-11 11:24               ` Alexander Holler
     [not found]                 ` <55796FDE.7080701-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-06-11 11:49                   ` Alexander Holler
2015-06-11 12:30             ` Linus Walleij
2015-06-11 16:40               ` Alexander Holler
     [not found]                 ` <5579B9E8.9040609-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-06-12  7:25                   ` Linus Walleij
     [not found]                     ` <CACRpkdbDSS0yw=q_cR17Bvg+kgTfU3Vcd2gSjx1p4V-CzOZ_SA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-12 11:19                       ` Alexander Holler
2015-06-12 11:36                         ` Alexander Holler
2015-06-13 18:27                           ` Alexander Holler
     [not found]                             ` <557C7609.30400-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-06-15  8:58                               ` Linus Walleij
     [not found]                                 ` <CACRpkdaVZmq_w_qgEgTP5oqfH3K1+80O7z7o7CJx-dhivUGhDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-15  9:42                                   ` Alexander Holler
2015-06-11 13:09             ` Tomeu Vizoso
2015-06-10 10:19       ` Tomeu Vizoso
2015-06-10 12:23         ` Andrzej Hajda
2015-06-10 18:38           ` Alexander Holler
2015-06-11  8:15         ` Linus Walleij
2015-06-11  9:56           ` Tomeu Vizoso
2015-06-02 22:54   ` Alexander Holler
2015-06-03 21:12 ` Rob Clark
2015-06-04 21:03   ` Alexander Holler [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=5570BD32.9020705@ahsoftware.de \
    --to=holler@ahsoftware.de \
    --cc=dan.j.williams@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=stephane.marchesin@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomeu.vizoso@collabora.com \
    /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).