mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Rob Herring <robh+dt@kernel.org>
Cc: "David Woodhouse" <dwmw2@infradead.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@codeaurora.org>,
	"Vinod Koul" <vinod.koul@intel.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Alexandre Courbot" <gnurou@gmail.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"David Airlie" <airlied@linux.ie>,
	"Terje Bergström" <tbergstrom@nvidia.com>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Wolfram Sang" <wsa@the-dreams.de>,
	"Frank Rowand" <frowand.list@gmail.com>,
	"Grant Likely" <grant.likely@linaro.org>,
	"Kishon Vijay Abraham I" <kishon@ti.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@gmail.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Felipe Balbi" <balbi@ti.com>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Jean-Christophe Plagniol-Villard" <plagnioj@jcrosoft.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-clk@vger.kernel.org, dmaengine@vger.kernel.org,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"Linux PWM List" <linux-pwm@vger.kernel.org>,
	"Linux USB List" <linux-usb@vger.kernel.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>
Subject: Re: [GIT PULL] On-demand device probing
Date: Mon, 19 Oct 2015 23:40:39 +0200	[thread overview]
Message-ID: <1603415.VWFZ8V0WMC@vostro.rjw.lan> (raw)
In-Reply-To: <CAL_JsqLwvc1H9kQnWs=mA8P4Mq4izmSSeFU6KRtkExBkzF9ABg@mail.gmail.com>

On Monday, October 19, 2015 10:58:25 AM Rob Herring wrote:
> On Mon, Oct 19, 2015 at 10:29 AM, David Woodhouse <dwmw2@infradead.org> wrote:
> > On Mon, 2015-10-19 at 15:50 +0100, Mark Brown wrote:
> >> > But the point I'm making is that we are working towards *fixing* that,
> >> > and *not* using DT-specific code in places where we should be using the
> >> > generic APIs.
> >>
> >> What is the plan for fixing things here?  It's not obvious (at least to
> >> me) that we don't want to have the subsystems having knowledge of how
> >> they are bound to a specific firmware which is what you seem to imply
> >> here.
> >
> > I don't know that there *is* a coherent plan here to address it all.
> >
> > Certainly, we *will* need subsystems to have firmware-specific
> > knowledge in some cases. Take GPIO as an example; ACPI *has* a way to
> > describe GPIO, and properties which reference GPIO pins are intended to
> > work through that — while in DT, properties which reference GPIO pins
> > will have different contents. They'll be compatible at the driver
> > level, in the sense that there's a call to get a given GPIO given the
> > property name, but the subsystems *will* be doing different things
> > behind the scenes.
> >
> > My plan, such as it is, is to go through the leaf-node drivers which
> > almost definitely *should* be firmware-agnostic, and convert those. And
> > then take stock of what we have left, and work out what, if anything,
> > still needs to be done.
> 
> Many cases are already agnostic in the drivers in terms of the *_get()
> functions. Some are DT specific, but probably because those subsystems
> are new and DT only. In any case, I don't think these 1 line changes
> do anything to make doing conversions here harder.
> 
> >> It seems like we're going to have to refactor these bits of code when
> >> they get generalised anyway so I'm not sure that the additional cost
> >> here is that big.
> >
> > That's an acceptable answer — "we're adding legacy code here but we
> > know it's going to be refactored anyway". If that's true, all it takes
> > is a note in the commit comment to that effect. That's different from
> > having not thought about it :)
> 
> Considering at one point we did create a fwnode based API, we did
> think about it. Plus there was little input from ACPI folks as to
> whether the change was even useful for ACPI case.

Well, sorry, but who was asking whom, specifically?

The underlying problem is present in ACPI too and we don't really have a good
solution for it.  We might benefit from a common one if it existed.

> In any case, we're talking about adding 1 line.

But also about making the driver core slighly OF-centric.

Sure, we need OF-specific code and ACPI-specific code wherever different
handling is required, but doing that at the driver core level seems to be
a bit of a stretch to me.

Please note that we don't really have ACPI-specific calls in the driver core,
although we might have added them long ago even before the OF stuff appeared
in the kernel for the first time.  We didn't do that, (among other things)
because we didn't want that particular firmware interface to appear special
in any way and I'm not really sure why it is now OK to make OF look special
instead.

If it is trivial to avoid that (and you seem to be arguing that it is), why
do we have to do it?

Thanks,
Rafael


  reply	other threads:[~2015-10-19 21:11 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14  8:34 Tomeu Vizoso
2015-10-14  9:26 ` Mark Brown
2015-10-15 11:42   ` Tomeu Vizoso
2015-10-16 21:23     ` Olof Johansson
2015-10-17 15:19       ` Rob Herring
2015-10-19 16:52         ` Olof Johansson
2015-10-17  6:57 ` Greg Kroah-Hartman
2015-10-17 15:04   ` Rob Herring
2015-10-17 15:47     ` Greg Kroah-Hartman
2015-10-17 16:28       ` Rob Herring
2015-10-17 16:56         ` Greg Kroah-Hartman
2015-10-17 17:54           ` Rob Clark
2015-10-17 18:27             ` Greg Kroah-Hartman
2015-10-17 18:45               ` Rob Clark
2015-10-17 18:59                 ` Greg Kroah-Hartman
2015-10-17 19:39                   ` Rob Clark
2015-10-17 20:22                     ` Greg Kroah-Hartman
2015-10-17 19:04                 ` Noralf Trønnes
2015-10-17 19:48                   ` Rob Clark
2015-10-18 19:41       ` Mark Brown
2015-10-18 19:29   ` Mark Brown
2015-10-18 19:37     ` Greg Kroah-Hartman
2015-10-18 19:53       ` Mark Brown
2015-10-19  9:44         ` David Woodhouse
2015-10-19  9:52           ` Russell King - ARM Linux
2015-10-19 11:02           ` Mark Brown
2015-10-19 12:35           ` Rob Herring
2015-10-19 12:47             ` David Woodhouse
2015-10-19 14:50               ` Mark Brown
2015-10-19 15:29                 ` David Woodhouse
2015-10-19 15:43                   ` Russell King - ARM Linux
2015-10-19 18:27                     ` Uwe Kleine-König
2015-10-19 18:39                       ` Russell King - ARM Linux
2015-10-19 23:47                         ` Alexandre Courbot
2015-10-20  7:14                           ` gpiod API considerations [Was: [GIT PULL] On-demand device probing] Uwe Kleine-König
2015-10-20 11:12                     ` [GIT PULL] On-demand device probing David Woodhouse
2015-10-19 15:58                   ` Rob Herring
2015-10-19 21:40                     ` Rafael J. Wysocki [this message]
2015-10-19 22:58                       ` Rob Herring
2015-10-20  7:56                         ` Rafael J. Wysocki
2015-10-20 14:15                           ` Rob Herring
2015-10-20 14:40                             ` Alan Stern
2015-10-20 15:36                               ` Mark Brown
2015-10-20 16:04                                 ` Alan Stern
2015-10-20 16:21                                   ` Tomeu Vizoso
2015-10-20 17:14                                     ` Alan Stern
2015-10-20 19:35                                       ` Mark Brown
2015-10-20 23:35                                         ` Rafael J. Wysocki
2015-10-21  6:15                                           ` Jean-Francois Moine
2015-10-22  0:54                                     ` Rafael J. Wysocki
2015-10-22  9:14                                       ` Tomeu Vizoso
2015-10-27  5:03                                   ` Rafael J. Wysocki
2015-10-20 23:34                             ` Rafael J. Wysocki
2015-10-21  8:55                               ` Geert Uytterhoeven
2015-10-21 23:39                                 ` Rafael J. Wysocki
2015-10-19 16:04                   ` Mark Brown
2015-10-19 12:34         ` Tomeu Vizoso
2015-10-19 13:18           ` Russell King - ARM Linux
2015-10-19 14:10             ` Tomeu Vizoso
2015-10-19 14:30               ` Russell King - ARM Linux
2015-10-19 15:00                 ` Tomeu Vizoso
2015-10-19 15:35                   ` Russell King - ARM Linux
2015-10-19 16:21                     ` Geert Uytterhoeven
2015-10-19 16:45                       ` Russell King - ARM Linux
2015-10-20 15:46                       ` Alternative approach to solve the deferred probe (was: [GIT PULL] On-demand device probing) Russell King - ARM Linux
2015-10-21  3:58                         ` Alternative approach to solve the deferred probe Frank Rowand
2015-10-21  8:18                           ` Russell King - ARM Linux
2015-10-21 15:36                             ` Frank Rowand
2015-10-21 16:55                               ` Grygorii Strashko
2015-10-21 17:20                                 ` Russell King - ARM Linux
2015-10-21 18:13                                   ` Grygorii Strashko
2015-10-21 18:28                                     ` Russell King - ARM Linux
2015-10-22 15:12                                       ` Grygorii Strashko
2015-10-21 18:02                                 ` Frank Rowand
2015-10-21 18:29                                   ` Grygorii Strashko
2015-10-21 20:35                               ` Russell King - ARM Linux
2015-10-22  0:05                                 ` Frank Rowand
2015-10-22 13:20                         ` Alternative approach to solve the deferred probe (was: [GIT PULL] On-demand device probing) Mark Brown
2015-10-21 15:59           ` [GIT PULL] On-demand device probing Frank Rowand
2015-10-21 16:27             ` Mark Brown
2015-10-21 18:18               ` Frank Rowand
2015-10-21 21:03                 ` Mark Brown
2015-10-21 21:12                 ` Rob Herring
2015-10-21 21:50                   ` Frank Rowand
2015-10-22  9:05                     ` Tomeu Vizoso
2015-10-22 14:38                       ` Greg Kroah-Hartman
2015-10-22 14:44                       ` Greg Kroah-Hartman
2015-10-22 15:02                         ` Russell King - ARM Linux
2015-10-22 23:33                           ` Mark Brown
2015-10-22 18:53                         ` Frank Rowand
2015-10-22 19:26                           ` Greg Kroah-Hartman
2015-10-23 12:28                             ` Tomeu Vizoso
2015-10-23 15:45                           ` Tim Bird
2015-10-23 16:34                             ` Rob Herring
2015-10-24 14:17                               ` Rafael J. Wysocki
2015-10-24 22:06                                 ` Mark Brown
2015-10-25 13:54                                   ` Rafael J. Wysocki
2015-10-26  1:12                                     ` Mark Brown
2015-10-26 10:51                                     ` Michael Turquette
2015-10-26 12:55                                       ` Tomeu Vizoso
2015-10-26 23:37                                       ` Rafael J. Wysocki
2015-10-25 19:45                             ` Andrew F. Davis
2015-10-24 17:55                           ` Geert Uytterhoeven

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=1603415.VWFZ8V0WMC@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=airlied@linux.ie \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dbaryshkov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dwmw2@infradead.org \
    --cc=frowand.list@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.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-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sre@kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tbergstrom@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomeu.vizoso@collabora.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=vinod.koul@intel.com \
    --cc=wsa@the-dreams.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®