Multiple virtual bus instances
Hi Greg,
Quoted 4 lines
Quoted 2 lines
I've been working through trying to create a virtual bus.
How does this differ from a "real" bus?
None, just there wasn't a real hardware bus (O'Reilly's Linux Device Drivers 3 chapter 14 page 377).
Quoted 6 lines
Quoted 4 lines
I've successfuly made it work for a single instance but wanted to confirm how to create multiple instances of the virtual bus.
Why would you need that?
We are trying to get the device drivers for the Catweasel MK3/4 cards ready for submission into mainline after repeated requests. However the hardware on it differs greatly in nature so we have serveral fragmented drivers for each specific bit (written by different parties). Naturally they don't play well together.
It was thought creating a bus for each pci cmk3/4 card, where the bus deals with bank switching, etc. This allows individual drivers to use newly exported devices fixing the issues we have now. It would also help being this way for debugging, i.e. other parties code can be easily removed.
Quoted 7 lines
Quoted 6 lines
I believe to do this you have only one instance of your new
bus_typeregistered but register multiple instances of struct device for it. I just wanted to confirm that was correct.
Quoted 5 lines
That would create multiple devices on the same bus. Is that what you need to do?
From your description no. One thing I
was however trying to avoid was lots of buses showing under /sys/bus.
Quoted 5 lines
Note that you can have multiple trees of devices, all with the same
bus_type, yet not joined together in any other way. Odds are, you probably want to do that, right?
Yes. If you still think that is correct given the above are there examples to follow?
Regards,
Simon
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html