On Thu, 28 Jul 2022 at 15:50, Markus Armbruster <arm...@redhat.com> wrote: > Kevin Wolf <kw...@redhat.com> writes: > > > > But if you have more than one device, it becomes hard to predict which > > device gets which backend - it depends on the initialisation order in > > the code then, > > Really? Board code should use IF_OTHER devices just like it uses the > other interface types, namely connecting each frontend device to a > backend device with a well-known and fixed interface type and index (or > bus and unit instead, where appropriate).
I think part of the problem is that unlike the typical disk interface, where there is some idea of bus-and-unit-number or index number that it makes sense to expose to users, these "miscellaneous storage" devices don't have any particular index concept -- in the real hardware there are just a random set of devices that are connected in various places. So you're requiring users to look up the documentation for "index 0 is this eeprom, index 1 is that other eeprom, index 2 is ...". thanks -- PMM