[PATCH] spi/spi-altera: Allow to explicitely override bus number via dts

Frederic LAMBERT frdrc66 at gmail.com
Thu Feb 2 02:52:14 EST 2012


2012/2/1 Mark Brown <broonie at sirena.org.uk>

>
> Well, something that walks all block devices on Linux is very
> straightforward...  It sounds like you just want logic along the lines
> of "find a block device and offer the option of overriding by providing
> a specific path for use with a file", is that about right?
>

Well, yes, excepted that the file *is* equivalent to a block device for my
piece of code!

 > Although I tend to agree you on the fact that SPI bus num is a SPI core
> > matter, but the fact is that, for now, it is the controller that must
> fill
> > the spi_master structure to call spi_master_get(), and that this
> structure
> > contains a field 'bus_num' that is always initialized to -1 since DTS...
>
> This sounds like a simple matter of proramming to change.  Clearly
> providing a standard feature of the SPI subsystem will involve
> modification of the SPI core, for example to change the interpretation
> of -1 to go look at the device tree and override it.
>

Yes, that seems simple said like that.
It was thus more simple for me, at that time, to modify a specific driver
for a specific port (Nios2), than to modify a core used by every one.
Question of time, and confidence in my own capacities :-).
The other point being the change acceptation (and the time it takes) by the
community...

-- 
Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120201/3c82ef5a/attachment-0001.html>


More information about the devicetree-discuss mailing list