On Fri, 5 Jan 2024, Brad Spencer wrote: > I see a few options for doing this, such as simply matching all of the > possible children and using sysctl to enable the one you want. Probably > followed by a rescan call. That seems ugly, however. The use of > 'drvctl -r -a <attribute>' seemed to hold promise. It seems like a > better idea to require the detachment of whatever followed by the rescan > with the attribute indicating which sort of thing you wanted to attach > (detach ucom in favor of i2c, for example). But I do not completely > understand if this sort of thing is possible.
I don't see why it shouldn't be.. you attach your main driver as a bus, then send it a message as to what configuration you need, then it essentially rescans and finds and attaches or detaches sub-drivers as appropriate. I did this sort of thing in software with bthub(4) iain