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

Ernst Schwab eschwab at online.de
Wed Feb 17 05:59:43 EST 2010


Grant Likely <grant.likely at secretlab.ca> wrote:

> Add a property to the /chosen node to assign short labels to devices.

I'm not familiar with this and will check - does anyone know of an
existing example for this? 

> Unless you're trying to line up disparate data structure, the actually
> number assigned to a bus really doesn't matter.  It is better to let
> Linux dynamically assign than to manually maintain the assigned bus
> numbers for each machine.  Assuming dynamic assignment also protects
> against breaking userspace applications when, for whatever reason, the
> bus numbers get shuffled on a platform.

Hm. What if we have two identical devices, lets say EEPROMs at25,
connected to two SPI controllers. These are set up as 
/sys/bus/spi/devices/spi32766.0/eeprom and 
/sys/bus/spi/devices/spi32765.0/eeprom. 
How can userspace code determine which one it should 
use if it needs to use the one connected to the first spi controller?
Can this be solved with the /chosen mechanism?

Regards
Ernst


More information about the devicetree-discuss mailing list