> Note that I *only* object to case 2 (derive bus name from parent
> device's ID).  Case 3 (derive bus name from bus type) is fine with me.
> 
> > Using a single counter for all busses is also wrong. The order of bus
> > creation is a device implementation detail, under no circumstances
> > should it be part of the user visible API.  Consider a device that has
> > both a PCI and I2C bus. It makes no sense to call there pci.0 and i2c.1.
> 
> Yes, that's a bit ugly.

I'd accept deriving bus name from bus type (case 3) if we remove the 
numbering.

If there are multiple busses of the same type then the parent device must 
provide a name. In this case I don't believe generic code has enough knowledge 
to make sensible or consistent choices. A user-visible interface defined by 
internal implementation details (order of creation) makes me twitchy.

Take a graphics card as an example of something with multiple I2C busses.
IMO it would make much more sense to call them things like ".ddc" and 
".sensors" than ".0" and ".1".

Paul

Reply via email to