On Wed, Nov 14, 2018 at 09:52:33AM +0100, Sascha Hauer wrote:
> Previous implementation used to add a number to the device names
> for devices registered from the device tree which did not have a 'reg'
> property, thus a device node named "state" resulted in a device name
> "state.<x>". Current implementation skips that number and we get a
> device named "state". This conflicts with our barebox state
> implementation which tries to register a device named "state" itself.
> We could rename the state device nodes of all our device trees, but it
> causes less trouble to rename the devices.
> 
> This adds a ".of" suffix to the device names for devices registered from
> the device tree which also has the nice effect that they now can easily
> be recognized.

Well, that also breaks scripting based on device name (example):
-if [ ${fffa4000.gad...@fffa4000.vbus} != 1 ]
+if [ ${fffa4000.gad...@fffa4000.of.vbus} != 1 ]
 then
        echo "No USB Device cable plugged, normal boot"
        exit 0

I can live with that, but would welcome suggestions how to write above
code in some nicer way.

Thank you

> Fixes: 7e497d48acbd11 ("of: Port latest of_device_make_bus_id() 
> implementation")

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to