lkml.org 
[lkml]   [2002]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Device Model Docs
Date
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/

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