[lkml]   [2002]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Device Model Docs
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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.064 / U:8.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site