Re: Fundamental Design Flaw of the Device Driver Model?

From: Pavel Machek
Date: Fri Aug 22 2008 - 05:03:28 EST


> Fundamental Design Flaw of the Device Driver Model?
> ===================================================
>
> Sorry for the misleading subject, its purpose is to draw your attention :-)
> The ideas below are preliminary and I hope I'm not making serious mistakes
> here.
>
> This question has actually been around in my mind for several months, when
> I started to work on some devices with multiple functions. Specifically, a
> Power Management IC (PMIC in short in the following text) usually includes
> LEDs support (charging, indication...) audio, touch screen, power monitoring,
> LDOs, DC-DC bucks, and possibly some others.
>
> The initial two ideas came into my mind were:
>
> 1. separate the functions into multiple devices, write a driver for each
> of these devices

Go for 1.

> 4. An intermediate device with no bus, no driver, no many other things
> is really not something deserving a "struct device", that's a waste
> of memory.

Memory is not _that_ expensive, and struct device is not that
big. Adding infrastructure to driver model for supporting this would
also cost you memory, this time in .text segment.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/