lkml.org 
[lkml]   [2005]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.6.11-rc2-mm1
From
Date
On Wed, 2005-01-26 at 10:26 -0500, Dmitry Torokhov wrote:
> On Wed, 26 Jan 2005 17:59:07 +0300, Evgeniy Polyakov
> <johnpol@2ka.mipt.ru> wrote:
>
> > Each superio chip has the same logical devices inside.
> > With your approach we will have following schema:
> >
> > bus:
> > superio1 - voltage, temp, gpio, rtc, wdt, acb
> > superio2 - voltage, temp, gpio, rtc, wdt, acb
> > superio3 - voltage, temp, gpio, rtc, wdt, acb
> > superio4 - voltage, temp, gpio, rtc, wdt, acb
> >
> > Each logical device driver (for existing superio schema)
> > is about(more than) 150 lines of code.
> > With your approach above example will be 150*6*4 +
> > 4*superio_chip_driver_size bytes
> > of the code.
>
> ????? Let's count again, shall we? Suppose we have:
> > superio1 - voltage, temp, gpio, rtc, wdt, acb
> > superio2 - voltage, temp, gpio, rtc, wdt, acb
> superio1 is driven by scx200 hardware, superio2 is driven by pc8736x
> or whatever. So here, you have 2 drivers to manage chips. Plus you
> have 6 superio interface drivers - gpio, acb, etc...
> It is exactly the same as your cheme size-wise.
>
> There is no need to many-to-many relationship. Each chip is bound to
> only one chip driver which registers several interfaces. Each
> interface is bound to only one interface driver. Interface driver is
> not chip specific, it knows how to run a specific interface (gpio,
> temp) and relies on chip driver to properly manage access to the
> hardware. Each combination of inetrface + interface driver produce one
> class_device (call it sio, serio, whatever). Class device provides
> unified view of the interface to the userspace.
>
> What am I missing?

Since each logical device does not know who use it, it can not be,
for example, removed optimally.
You need to run through whole superio device set to find those one that
has reference to logical device being removed.
And situation become much worse, when we have so called logical device
clones -
it is virtual logical device that emulates standard one, but inside
performs
in a different way. Clone creates inside superio device(for example such
device
can live at different address).
When you do not have ldev->sc relation, you must traverse through each
logical device
in each superio chip to find clones.
Thus you will need to traverse through each superio chip,
then through each logical device it references, just to remove one
logical device.

--
Evgeniy Polyakov

Crash is better than data corruption -- Arthur Grabowski
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.074 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site