lkml.org 
[lkml]   [2002]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: driverfs: driver interface
On Thu, Aug 15, 2002 at 08:53:08PM +0000, Adam Belay wrote:
>
> Check this out. Rather than explaining it, I've attached it to this
> email. It might solve this problem. It's based on an idea I stated
> earlier. I haven't quite worked out the details yet and I'm not really
> even sure if it's the best thing to do. I created a sample interface
> comprised of folders and links and then tarred and gzipped it. I'm
> looking forward to some reactions on it. (look in ./driver)

Hm, I think you're missing the whole point about classes. You are
trying to do to the driver code, what will be done with the class
code.

Here's the interaction:
- devices have a driver bound to them
- devices live in the /root tree, showing how they are
interconnected.
- drivers register with a bus (possibly more than one.)
- drivers bind to a device present on a bus, and a class (some
drivers bind to many classes)
- classes interact with userspace somehow, providing the
interface between the device and the user.

As an example:
- A USB keyboard lives in the device tree.
- The USB HID driver binds to the device, and the input class
(both the keyboard and generic subclasses of the input code.)
- the user types keys, and that data gets sent from the USB
code, to the HID driver, to the input core, which then
translates them and sends the info out the /dev node.

Within your model, you are not accounting for the different classes
(input, serial, usb-serial, tty, disk, video, etc.). Take a look at the
documentation for all of this for more information.

> Also I have two questions:
>
> 1.) Is it worth it to remove the bus interface?

No.

> 2.) Should driver management occur through driver model interfaces?

No. Let's leave that the way things are today in this regards.

thanks,

greg k-h
-
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:28    [W:0.105 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site