From: Mark Brown <broonie@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Grant Likely <grant.likely@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Sven Van Asbroeck <thesven73@gmail.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Simon Han <z.han@kunbus.com>, Lukas Wunner <lukas@wunner.de>,
linux-spi <linux-spi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors
Date: Mon, 16 Nov 2020 21:06:32 +0000 [thread overview]
Message-ID: <20201116210632.GJ4739@sirena.org.uk> (raw)
In-Reply-To: <CACRpkdZW3G48Yj3yGMTKZGwVEQOSs1VeVTTGLgyoJViM3=Yedg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]
On Wed, Nov 11, 2020 at 02:36:07PM +0100, Linus Walleij wrote:
> On Wed, Nov 11, 2020 at 1:33 PM Mark Brown <broonie@kernel.org> wrote:
> > On Wed, Nov 11, 2020 at 02:05:19AM +0100, Linus Walleij wrote:
> > This is not clear to me, most of these settings are things that are
> > constant for the device so it's not clear that they should be being set
> > by the device tree in the first place.
> This was added initially with some two properties
> in drivers/of/of_spi.c in 2008:
> commit 284b01897340974000bcc84de87a4e1becc8a83d
> "spi: Add OF binding support for SPI busses"
> This was around the time ARM was first starting to migrate
> to device tree, so I suppose it made sense to them/us back
> then.
That's from PowerPC days, not ARM, and frankly a lot of DT conversions
were just fairly mechanical conversions of what was in platform data to
DT so they may not have been especially considered.
> compatible-string. It was later that especially Rob pointed out that
> random properties on device nodes was overused and that simply
> knowing the compatible is often enough.
I've been pushing this since forever as well, as far as I remember it's
been a thing since we started doing this.
> I don't know if we ever formalized it, there is nowadays a rule akin to
> "if a property can be determined from the compatible-string, and if the
> compatible-string is identifying the variant of the electronic component,
> then do not add this property to the device tree description. Just
> deduce it from the compatible-string, assign it with code to the device
> model of the operating system and handle it inside the operating system."
> I think this, while clear and intuitive, wasn't at all clear and intuitive in
> the recent past.
I think the main push in the other direction has always been people who
want to not have to write a driver at all and put absolutely everything
into DT which has scaling issues :/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-11-16 21:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 15:07 [PATCH v1] spi: fix client driver breakages when using GPIO descriptors Sven Van Asbroeck
2020-11-09 14:25 ` Andy Shevchenko
2020-11-09 14:41 ` Sven Van Asbroeck
2020-11-11 1:05 ` Linus Walleij
2020-11-11 12:33 ` Mark Brown
2020-11-11 13:36 ` Linus Walleij
2020-11-16 21:06 ` Mark Brown [this message]
2020-11-18 1:03 ` Linus Walleij
2020-11-18 11:40 ` Mark Brown
2020-11-24 15:21 ` Linus Walleij
2020-11-24 16:40 ` Mark Brown
2020-11-25 9:19 ` Grant Likely
2020-11-25 9:17 ` Grant Likely
2020-11-11 1:08 ` Linus Walleij
2020-11-11 15:48 ` Mark Brown
2020-11-11 16:24 ` Sven Van Asbroeck
2020-11-11 16:32 ` Mark Brown
2020-11-12 11:41 ` Charles Keepax
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=20201116210632.GJ4739@sirena.org.uk \
--to=broonie@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=grant.likely@arm.com \
--cc=jonathan.cameron@huawei.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=robh+dt@kernel.org \
--cc=thesven73@gmail.com \
--cc=z.han@kunbus.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).