[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160526184746.GF16172@sirena.org.uk>
Date: Thu, 26 May 2016 19:47:46 +0100
From: Mark Brown <broonie@...nel.org>
To: Christer Weinigel <christer@...nigel.se>
Cc: Rob Herring <robh@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH] devicetree - document using aliases to set spi bus
number.
On Thu, May 26, 2016 at 12:58:22PM +0200, Christer Weinigel wrote:
> One of the main drivers behind devicetree was that Linus got fed up
> with the churn for all platform device changes in arch/arm. I faintly
> recall him writing that he would be rather unhappy if that just got
> replaced with churn for devicetree dts files.
Since device trees are hardware descriptions they really shouldn't be
churning at all - if they are that's an indication that we're failing at
device tree.
> It makes sense to include dts files for reference boards in the
> mainline kernel. To include dts files for every vendors variant of a
> design would add just as much churn and be rather pointless. My guess
> is that the dts file for most platforms are kept private.
Well, a huge proportion of platforms don't work with upstream or upgrade
kernel versions at all but rather use vendor BSPs with all sorts of fun
stuff that the broader community would question strongly. It's really
quite muddy.
> For platforms based on a FPGA such as the Xilinx Zync it's even more
> pointless to submit dts files to mainline. When you have "hardware"
> that can be reconfigured the device tree files can't be set in stone.
> If I use Xilinx tools [1] to add one more UART I have just added new
> hardware this needs to be reflected in the devicetree for the devices
> to be usable in Linux. And something like aliases which provides a
> stable device name can be very useful here.
Right, but it doesn't follow that aliases are what we should be doing
here - both Rob and myself have mentioned providing a way to label the
actual SPI devices themselves, this seems like a more robust way of
doing things. For example in a FPGA environment it would allow you to
keep names stable even if you decide to reorganize the distribution of
devices between controllers or mappings of chip selects and would have
similar benefits for handling board variants. Just numbering the buses
provides a partial solution for some systems with usability drawbacks
(you need to know the number to name mapping somehow), naming devices
is both more direct and more general.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists