Re: Device Model Docs

Arnd Bergmann (arnd@bergmann-dalldorf.de)
Sat, 6 Jul 2002 03:36:54 +0200


On Friday 05 July 2002 20:10, Patrick Mochel wrote:
> This is similar to the input layer. Initially, I had grouped specific
> devices into subclasses. But, I learned that a device really belongs to
> multiple subclasses (e.g. evdev and mouse). Hence the concept of one class
> with multiple interfaces...

I think this network device is a bit different. While AFAICS the mouse has
both interfaces at the same time, an lcs adapter always has exactly one
interface, but depending on some device properties, the interface can be
called _either_ 'eth0' or 'tr0' (or probably something else for fddi).

A possible class model to represent this might be:
- each device_driver belongs to one device_class
- a device_class has one or more subclasses
- a device belongs to one subclass of its drivers class
- a subclass has one or more interfaces that are implemented for
every device of this subclass

This is of course more complicated than your single class - multiple
interfaces solution but could be closer to what the drivers do today.
The tradeoff probably depends on how many drivers are as broken
as lcs and on how fine-grained you want your classes to be.

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/