
Hi Marek,
On Tue, Sep 4, 2012 at 4:44 PM, Marek Vasut marek.vasut@gmail.com wrote:
Dear Graeme Russ,
Hi DM Team,
On Thu, Aug 23, 2012 at 4:28 AM, Marek Vasut marek.vasut@gmail.com wrote:
Dear Marek Vasut,
I'm submitting hereby the initial code for the driver model. This is a RFC patch, please give it a spin and scream :-)
I haven't had a really deep play with this yet, but a couple of things do come to mind...
I've been thinking of a scenario of a simple LED module with both a Serial (RS-232) and USB interface (or maybe an I2C connection). I can think of two options: a) Write a separate driver for each interface b) Write a single driver that can handle all supported interfaces
c) Write a muxing driver, basically you'd have two drivers -- "led-module-uart" and "led-module-usb" -- which would share common logic. The upcall towards the bus can also be pretty much covered by some local wrappers.
Adds a little overhead, but sounds sound. But also, you should give the downstream driver the ability to check that it is being attached to a valid upstream driver - Attaching a USB ethernet dongle to PCI isn't going to cut it. This will be critical if we allow modularisation of the driver sub-system (i.e. dynamically load a driver module and bind it from the command line)
Regards,
Graeme