On Tue, Jun 18, 2019 at 10:39 PM Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Tue, 2019-06-18 at 22:33 +0200, Arnd Bergmann wrote: > It seems to me though that this is far more complex than what I'm > proposing? What I'm proposing there doesn't even need any userspace > involvement, as long as all the pieces are in the different sub-drivers, > they'd fall out automatically. > > And realistically, the wwan_device falls out anyway at some point, the > only question is if we really make one specific driver be the "owner" of > it. I'm suggesting that we don't, and just make its lifetime depend on > the links to parts it has (unless something like IPA actually wants to > be an owner). My feeling so far is that having the wwan_device be owned by a device gives a nicer abstraction model that is also simpler for the common case. A device driver like ipa would end up with a probe() function that does does wwan_device_alloc/wwan_device_register, corresponding to alloc_etherdev/register_netdev, and then communicates through callbacks. I agree the compound device case would get more complex by shoehorning it into this model, but that can be a valid tradeoff if it's the exceptional case rather than the common one. Arnd