All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Linus Walleij <linus.walleij@linaro.org>,
	"Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, Hans de Goede <hdegoede@redhat.com>
Subject: Re: [RFC PATCH 11/12] platform/x86: skeleton for oftree based board device initialization
Date: Fri, 12 Feb 2021 12:54:50 +0100	[thread overview]
Message-ID: <c5ed2b27-21a2-5a07-8dd9-e080f9a6cd98@metux.net> (raw)
In-Reply-To: <CACRpkdYbOX_RDqwxaiugtYB4vSpSKChvKsPjcB_vv3Q74QeG2Q@mail.gmail.com>

On 12.02.21 10:58, Linus Walleij wrote:

Hi,

> I think Intel people often take the stance that the ACPI DSDT (or whatever)
> needs to be fixed.

It should, actually board/firmware vendors should think more carefully
and do it right in the first place. But reality is different. And
firmware upgrade often is anything but easy (as soon as we leave the
field of average Joh Doe's home PC)

> If the usecase is to explicitly work around deployed firmware that cannot
> and will not be upgraded/fixed by describing the hardware using DT
> instead, based on just the DMI ID then we should spell that out
> explicitly.

Okay, maybe I should have stated this more clearly.

OTOH, the scope is also a little bit greater: certain external cards
that don't need much special handling for the card itself, just
enumerate devices (and connections between them) using existing drivers.

That's a pretty common scenario in industrial backplane systems, where
we have lots of different (even application specific) cards, usually
composed of standard chips, that can be identified by some ID, but
cannot describe themselves. We have to write lots of specific drivers
for them, usually just for instantiating existing drivers. (we rarely
see such code going towards mainline).

A similar case (mainlined) seems to be the RCAR display unit - they're
using dt overlays that are built into the driver and applied by it
based on the detected DU at runtime. RCAR seems to be a pure DT
platform, so that's an obvious move. APU2/3/4 is ACPI based, so I went
in a different direction - but I'm now investigating how to make DT
overlays work on an ACPI platform (eg. needs some initial nodes, ...)
In case that's successful, I'll rework my RFC to use overlays, and
it will become much smaller (my oftree core changes then won't be
necessary anymore).

> It feels a bit like fixing a problem using a different hardware description
> just because we can. Look in drivers/gpio/gpiolib-acpi.c
> table gpiolib_acpi_quirks[]. It's just an example how this is fixed using
> fine granular ACPI-specific mechanisms at several places in the kernel
> instead of just tossing out the whole description and redoing it in
> device tree.

I'm quite reluctant to put everything in there. Theoretically, for apu
case, I could prevent enumerating the incomplete gpios there, but the
actual driver setup still remains (certainly don't wanna put that into
such a global place). But the original problem of having to write so
much code for just instantiating generic drivers remains. And
distributing knowledge of certain devices over several places doesn't
feel like a good idea to me.


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  reply	other threads:[~2021-02-12 11:59 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 22:21 RFC: oftree based setup of composite board devices Enrico Weigelt, metux IT consult
2021-02-08 22:21 ` [RFC PATCH 01/12] of: base: improve error message in of_phandle_iterator_next() Enrico Weigelt, metux IT consult
2021-02-08 22:21 ` [RFC PATCH 02/12] of: base: introduce of_find_node_by_phandle_from() Enrico Weigelt, metux IT consult
2021-02-08 22:21 ` [RFC PATCH 03/12] of: base: record root node in interator and use it for phandle lookup Enrico Weigelt, metux IT consult
2021-02-08 22:21 ` [RFC PATCH 04/12] of: base: introduce of_match_string() Enrico Weigelt, metux IT consult
2021-02-08 23:52   ` Rob Herring
2021-02-08 22:21 ` [RFC PATCH 05/12] of: kobj: __of_attach_node_sysfs(): add optional basename parameter Enrico Weigelt, metux IT consult
2021-02-08 22:21 ` [RFC PATCH 06/12] of: kobj: introduce of_attach_tree_sysfs() Enrico Weigelt, metux IT consult
2021-02-08 22:21 ` [RFC PATCH 07/12] gpio: amd-fch: add oftree probing support Enrico Weigelt, metux IT consult
2021-02-09  3:46   ` kernel test robot
2021-02-11  9:57   ` Bartosz Golaszewski
2021-02-13  4:26   ` kernel test robot
2021-03-01 14:51   ` Linus Walleij
2021-03-11 10:17     ` Enrico Weigelt, metux IT consult
2021-03-11 10:42       ` Andy Shevchenko
2021-03-18  8:00         ` Enrico Weigelt, metux IT consult
2021-03-25  9:09           ` Linus Walleij
2021-02-08 22:21 ` [RFC PATCH 08/12] drivers: base: introduce bus_remove_device_by_name() Enrico Weigelt, metux IT consult
2021-02-08 22:22 ` [RFC PATCH 09/12] drivers: base: reintroduce find_bus() Enrico Weigelt, metux IT consult
2021-02-13 10:20   ` Greg KH
2021-02-23 20:13     ` Enrico Weigelt, metux IT consult
2021-02-24  8:00       ` Greg KH
2021-02-24 15:30         ` Enrico Weigelt, metux IT consult
2021-02-24 16:28           ` Greg KH
2021-02-08 22:22 ` [RFC PATCH 10/12] export bus_get() / bus_put() Enrico Weigelt, metux IT consult
2021-02-08 22:22 ` [RFC PATCH 11/12] platform/x86: skeleton for oftree based board device initialization Enrico Weigelt, metux IT consult
2021-02-10 10:32   ` Andy Shevchenko
2021-02-12  9:58   ` Linus Walleij
2021-02-12 11:54     ` Enrico Weigelt, metux IT consult [this message]
2021-02-15  1:18       ` Frank Rowand
2021-02-23 20:41         ` Enrico Weigelt, metux IT consult
2021-03-02 13:33       ` Linus Walleij
2021-02-08 22:22 ` [RFC PATCH 12/12] platform/x86/of: add support for PC Engines APU v2/3/4 boards Enrico Weigelt, metux IT consult
2021-02-09  0:06   ` Rob Herring
2021-02-11 13:15     ` Enrico Weigelt, metux IT consult
2021-03-01 14:55   ` Linus Walleij
2021-02-08 23:48 ` RFC: oftree based setup of composite board devices Rob Herring
2021-02-10 22:13   ` Enrico Weigelt, metux IT consult
2021-02-15  1:12   ` Frank Rowand
2021-02-15 15:35     ` Andy Shevchenko
2021-02-24 13:00     ` Enrico Weigelt, metux IT consult
2021-02-24 23:14       ` Frank Rowand
2021-03-05 18:29         ` Rob Herring
2021-02-10 10:30 ` Andy Shevchenko
2021-02-11 11:08   ` Enrico Weigelt, metux IT consult
2021-02-11 11:41     ` Andy Shevchenko
2021-02-11 17:01       ` Enrico Weigelt, metux IT consult

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=c5ed2b27-21a2-5a07-8dd9-e080f9a6cd98@metux.net \
    --to=lkml@metux.net \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=info@metux.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    /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.