[PATCH] of: add bus-number specification to spi_mpc8xxx

Grant Likely grant.likely at secretlab.ca
Wed Feb 17 01:28:39 EST 2010


On Tue, Feb 16, 2010 at 7:08 AM, Ernst Schwab <eschwab at online.de> wrote:
> From: Ernst Schwab <eschwab at online.de>
>
> Added devicetree parsing for SPI bus number. If no bus number is specified,
> a dynamically assigned bus number will be used (typically 32766).
>
> Signed-off-by: Ernst Schwab <eschwab at online.de>

No, unless you can provide a really compelling reason to do so, the
goal is to *not* specify Linux implementation detail things like bus
numbers in the device tree.

Instead, your code should be using spi device child nodes from the
bus, or finding the spi bus node and decoding the dynamically assigned
bus number from there.  Don't hard code spi bus numbers.

g.


More information about the devicetree-discuss mailing list