All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Mark Brown <broonie@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-fbdev@vger.kernel.org, linux-acpi@vger.kernel.org,
	alsa-devel@alsa-project.org,
	Stephen Warren <swarren@wwwdotorg.org>,
	Takashi Iwai <tiwai@suse.de>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-gpio@vger.kernel.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Linux PWM List <linux-pwm@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Alexandre Courbot <gnurou@gmail.com>
Subject: Re: [alsa-devel] [PATCH v2 11/12] ASoC: tegra: register dependency parser for firmware nodes
Date: Tue, 14 Jul 2015 09:34:22 +0200	[thread overview]
Message-ID: <CAAObsKAVY7-QpcRyT4juc2RyB+vqibvzKO7wFCT2VsL9R8bzPw@mail.gmail.com> (raw)
In-Reply-To: <20150713154254.GH11162@sirena.org.uk>

On 13 July 2015 at 17:42, Mark Brown <broonie@kernel.org> wrote:
> On Mon, Jul 13, 2015 at 02:10:45PM +0200, Tomeu Vizoso wrote:
>> On 1 July 2015 at 19:38, Mark Brown <broonie@kernel.org> wrote:
>> > On Wed, Jul 01, 2015 at 11:41:06AM +0200, Tomeu Vizoso wrote:
>
>> >> +static void tegra_max98090_get_dependencies(struct fwnode_handle *fwnode,
>> >> +                                         struct list_head *deps)
>> >> +{
>> >> +     add_dependency(fwnode, "nvidia,i2s-controller", deps);
>> >> +     add_dependency(fwnode, "nvidia,audio-codec", deps);
>> >> +}
>
>> > Why is this all being open coded in an individual driver (we already
>> > know about and manage all these dependencies in the core...)?  If we're
>> > going to do this I'd expect the interface for specifying DT nodes to the
>> > core to be changed to support this.
>
>> Are you thinking of changing drivers to acquire their resources
>> through Arnd's devm_probe (only that the resource table would have to
>> be in struct device_driver)?
>
>> https://lkml.kernel.org/g/4742258.TBitC3hVuO@wuerfel
>
> No, I'm looking at how we already have all the "did all my dependencies
> appear" logic in the core based on data provided by the drivers.

Sorry, but I still don't get what you mean.

Information about dependencies is currently available only after
probe() starts executing, and used to decide whether we want to defer
the probe.

The goal of this series is to eliminate most or all of the deferred
probes by checking that all dependencies are available before probe()
is called.

Because currently we only have dependency information after probe()
starts executing, we have to make it available earlier. In this
particular version, in callbacks that are registered from the
initcalls that register subsystems, classes, drivers, etc. Whatever
knows how these dependencies are expressed in the firmware data.

I thought you were pointing out that the property names would be
duplicated, once in the probe() implementation and also in the
implementation of the get_dependencies callback.

A way to consolidate the code and remove that duplication would be
having a declarative API for expressing dependencies, which could be
used for both fetching dependencies and for preventing deferred
probes. That's why I mentioned devm_probe.

Thanks,

Tomeu

WARNING: multiple messages have this Message-ID (diff)
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Mark Brown <broonie@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-fbdev@vger.kernel.org,
	Stephen Warren <swarren@wwwdotorg.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-gpio@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	alsa-devel@alsa-project.org,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-acpi@vger.kernel.org,
	Linux PWM List <linux-pwm@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Alexandre Courbot <gnurou@gmail.com>
Subject: Re: [alsa-devel] [PATCH v2 11/12] ASoC: tegra: register dependency parser for firmware nodes
Date: Tue, 14 Jul 2015 09:34:22 +0200	[thread overview]
Message-ID: <CAAObsKAVY7-QpcRyT4juc2RyB+vqibvzKO7wFCT2VsL9R8bzPw@mail.gmail.com> (raw)
In-Reply-To: <20150713154254.GH11162@sirena.org.uk>

On 13 July 2015 at 17:42, Mark Brown <broonie@kernel.org> wrote:
> On Mon, Jul 13, 2015 at 02:10:45PM +0200, Tomeu Vizoso wrote:
>> On 1 July 2015 at 19:38, Mark Brown <broonie@kernel.org> wrote:
>> > On Wed, Jul 01, 2015 at 11:41:06AM +0200, Tomeu Vizoso wrote:
>
>> >> +static void tegra_max98090_get_dependencies(struct fwnode_handle *fwnode,
>> >> +                                         struct list_head *deps)
>> >> +{
>> >> +     add_dependency(fwnode, "nvidia,i2s-controller", deps);
>> >> +     add_dependency(fwnode, "nvidia,audio-codec", deps);
>> >> +}
>
>> > Why is this all being open coded in an individual driver (we already
>> > know about and manage all these dependencies in the core...)?  If we're
>> > going to do this I'd expect the interface for specifying DT nodes to the
>> > core to be changed to support this.
>
>> Are you thinking of changing drivers to acquire their resources
>> through Arnd's devm_probe (only that the resource table would have to
>> be in struct device_driver)?
>
>> https://lkml.kernel.org/g/4742258.TBitC3hVuO@wuerfel
>
> No, I'm looking at how we already have all the "did all my dependencies
> appear" logic in the core based on data provided by the drivers.

Sorry, but I still don't get what you mean.

Information about dependencies is currently available only after
probe() starts executing, and used to decide whether we want to defer
the probe.

The goal of this series is to eliminate most or all of the deferred
probes by checking that all dependencies are available before probe()
is called.

Because currently we only have dependency information after probe()
starts executing, we have to make it available earlier. In this
particular version, in callbacks that are registered from the
initcalls that register subsystems, classes, drivers, etc. Whatever
knows how these dependencies are expressed in the firmware data.

I thought you were pointing out that the property names would be
duplicated, once in the probe() implementation and also in the
implementation of the get_dependencies callback.

A way to consolidate the code and remove that duplication would be
having a declarative API for expressing dependencies, which could be
used for both fetching dependencies and for preventing deferred
probes. That's why I mentioned devm_probe.

Thanks,

Tomeu
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Mark Brown <broonie@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-fbdev@vger.kernel.org,
	Stephen Warren <swarren@wwwdotorg.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-gpio@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	alsa-devel@alsa-project.org,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-acpi@vger.kernel.org,
	Linux PWM List <linux-pwm@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Alexandre Courbot <gnurou@gmail.com>
Subject: Re: [alsa-devel] [PATCH v2 11/12] ASoC: tegra: register dependency parser for firmware nodes
Date: Tue, 14 Jul 2015 07:34:22 +0000	[thread overview]
Message-ID: <CAAObsKAVY7-QpcRyT4juc2RyB+vqibvzKO7wFCT2VsL9R8bzPw@mail.gmail.com> (raw)
In-Reply-To: <20150713154254.GH11162@sirena.org.uk>

On 13 July 2015 at 17:42, Mark Brown <broonie@kernel.org> wrote:
> On Mon, Jul 13, 2015 at 02:10:45PM +0200, Tomeu Vizoso wrote:
>> On 1 July 2015 at 19:38, Mark Brown <broonie@kernel.org> wrote:
>> > On Wed, Jul 01, 2015 at 11:41:06AM +0200, Tomeu Vizoso wrote:
>
>> >> +static void tegra_max98090_get_dependencies(struct fwnode_handle *fwnode,
>> >> +                                         struct list_head *deps)
>> >> +{
>> >> +     add_dependency(fwnode, "nvidia,i2s-controller", deps);
>> >> +     add_dependency(fwnode, "nvidia,audio-codec", deps);
>> >> +}
>
>> > Why is this all being open coded in an individual driver (we already
>> > know about and manage all these dependencies in the core...)?  If we're
>> > going to do this I'd expect the interface for specifying DT nodes to the
>> > core to be changed to support this.
>
>> Are you thinking of changing drivers to acquire their resources
>> through Arnd's devm_probe (only that the resource table would have to
>> be in struct device_driver)?
>
>> https://lkml.kernel.org/g/4742258.TBitC3hVuO@wuerfel
>
> No, I'm looking at how we already have all the "did all my dependencies
> appear" logic in the core based on data provided by the drivers.

Sorry, but I still don't get what you mean.

Information about dependencies is currently available only after
probe() starts executing, and used to decide whether we want to defer
the probe.

The goal of this series is to eliminate most or all of the deferred
probes by checking that all dependencies are available before probe()
is called.

Because currently we only have dependency information after probe()
starts executing, we have to make it available earlier. In this
particular version, in callbacks that are registered from the
initcalls that register subsystems, classes, drivers, etc. Whatever
knows how these dependencies are expressed in the firmware data.

I thought you were pointing out that the property names would be
duplicated, once in the probe() implementation and also in the
implementation of the get_dependencies callback.

A way to consolidate the code and remove that duplication would be
having a declarative API for expressing dependencies, which could be
used for both fetching dependencies and for preventing deferred
probes. That's why I mentioned devm_probe.

Thanks,

Tomeu

  reply	other threads:[~2015-07-14  7:34 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01  9:40 [PATCH v2 0/12] Discover and probe dependencies Tomeu Vizoso
2015-07-01  9:40 ` Tomeu Vizoso
2015-07-01  9:40 ` Tomeu Vizoso
2015-07-01  9:40 ` [PATCH v2 01/12] device: property: delay device-driver matches Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01 23:29   ` Rafael J. Wysocki
2015-07-01 23:29     ` Rafael J. Wysocki
2015-07-10 11:39     ` Tomeu Vizoso
2015-07-10 11:39       ` Tomeu Vizoso
2015-07-10 11:39       ` Tomeu Vizoso
2015-07-16 20:23   ` Mark Brown
2015-07-16 20:23     ` Mark Brown
2015-07-16 23:41     ` Rafael J. Wysocki
2015-07-16 23:41       ` Rafael J. Wysocki
2015-07-16 23:41       ` Rafael J. Wysocki
2015-07-17  0:06       ` Mark Brown
2015-07-17  0:06         ` Mark Brown
2015-07-01  9:40 ` [PATCH v2 02/12] device: property: find dependencies of a firmware node Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01 23:36   ` Rafael J. Wysocki
2015-07-02  0:02     ` Rafael J. Wysocki
2015-07-10 13:14     ` [alsa-devel] " Tomeu Vizoso
2015-07-10 13:14       ` Tomeu Vizoso
2015-07-10 13:14       ` Tomeu Vizoso
2015-07-11  2:52       ` Rafael J. Wysocki
2015-07-11  2:52         ` Rafael J. Wysocki
2015-07-11  2:52         ` Rafael J. Wysocki
2015-07-01  9:40 ` [PATCH v2 03/12] string: Introduce strends() Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01  9:40 ` [PATCH v2 04/12] gpio: register dependency parser for firmware nodes Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01  9:40   ` Tomeu Vizoso
2015-07-01  9:41 ` [PATCH v2 05/12] gpu: host1x: " Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41 ` [PATCH v2 06/12] backlight: Document consumers of backlight nodes Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41 ` [PATCH v2 07/12] backlight: register dependency parser for firmware nodes Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41 ` [PATCH v2 08/12] USB: EHCI: " Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41 ` [PATCH v2 09/12] regulator: " Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-16 21:38   ` Mark Brown
2015-07-16 21:38     ` Mark Brown
2015-07-01  9:41 ` [PATCH v2 10/12] pwm: " Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41 ` [PATCH v2 11/12] ASoC: tegra: " Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01 17:38   ` Mark Brown
2015-07-01 17:38     ` Mark Brown
2015-07-13 12:10     ` [alsa-devel] " Tomeu Vizoso
2015-07-13 12:10       ` Tomeu Vizoso
2015-07-13 12:10       ` Tomeu Vizoso
2015-07-13 15:42       ` Mark Brown
2015-07-13 15:42         ` Mark Brown
2015-07-13 15:42         ` Mark Brown
2015-07-14  7:34         ` Tomeu Vizoso [this message]
2015-07-14  7:34           ` Tomeu Vizoso
2015-07-14  7:34           ` Tomeu Vizoso
2015-07-14 11:07           ` Mark Brown
2015-07-14 11:07             ` Mark Brown
2015-07-14 11:07             ` Mark Brown
2015-07-14 12:47             ` Tomeu Vizoso
2015-07-14 12:47               ` Tomeu Vizoso
2015-07-14 12:47               ` Tomeu Vizoso
2015-07-16 23:04               ` Mark Brown
2015-07-16 23:04                 ` Mark Brown
2015-07-01  9:41 ` [PATCH v2 12/12] driver-core: probe dependencies before probing Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso
2015-07-01  9:41   ` Tomeu Vizoso

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=CAAObsKAVY7-QpcRyT4juc2RyB+vqibvzKO7wFCT2VsL9R8bzPw@mail.gmail.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnurou@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.