On Thu, Apr 8, 2021 at 1:05 PM Gerd Hoffmann <g...@kraxel.org> wrote: > > Hi, > > > > Those might be a good place to start. IOKit provides the drivers and > > > also the io registry which is probably where you can get if a driver > > > is bound to a device and which one is it. How to dissociate the > > > driver from the device though I don't know. > > > https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/DeviceRemoval/DeviceRemoval.html > > > According to this article a driver has a stop() and detach() method > > that is called by the IOKit to remove a device. I'm thinking QEMU can > > be the one that calls these methods for a certain device. > > libusb should do that. Interfaces exist already (see > libusb_detach_kernel_driver & friends) because we have the very same > problem on linux. > > take care, > Gerd >
As far as I understand the patches here https://github.com/libusb/libusb/issues/906 they are internal to libusb, so we would need to build a libusb for use with e.g., brew to build a macOS executable. Or wait for them to be finalised to get included in libusb and then included in brew and then .... Best, Howard