Hi On Tuesday 05 of November 2013 14:34:03 Simon Glass wrote: > >> +Declaring Uclasses > >> +------------------ > >> + > >> +The demo uclass is declared like this: > >> + > >> +U_BOOT_CLASS(demo) = { > >> + .id = UCLASS_DEMO, > >> +}; > >> + > >> +It is also possible to specify special methods for probe, etc. The > >> uclass > >> +numbering comes from include/dm/uclass.h. To add a new uclass, add to > >> the > >> +end of the enum there, then declare your uclass as above. > > > > I wonder if we cannot even automate the numbering here ;-) > > We could but it would need some lookup mechanism. String search? I'll > leave it as is at the moment but add something to the bottom of the > README.
please keep in mind that the original design was done with the possibility of loading drivers as modules at runtime, while only having certain uclasses compiled in. having dynamic ID numbers would complicate things (more precisely, no dynamic uclass loading, uclass id map would be part of the driver ABI). if you have ditched the whole idea of runtime loading then please ignore me, i havent cought up with all the changes Regards Pavel Herrmann _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot