Re: [patch 0/8] Nesting class_device patches that actually work

From: Dmitry Torokhov
Date: Thu Oct 13 2005 - 16:22:20 EST

On 10/13/05, Vojtech Pavlik <vojtech@xxxxxxx> wrote:
> On Wed, Oct 12, 2005 at 07:08:44PM -0700, Greg KH wrote:
> >
> > Oh, one final thing. I really don't think that input should be a class.
> > It looks like a "bus" and acts like a "bus" (you have different devices
> > that have different drivers bind to them, and you want to load those
> > drivers with the hotplug mechanism.)
> [ Vojtech mumbles something about saying that from the beginning. ]

I think Greg spoke a bit hastily here. Input_devs do not directly talk
to the hardware and do not control power management and do not define
access methods for the hardware therefore using bus abstraction would
be wrong.

> > The only thing keeping this from
> > being a bus is the fact that we can't bind multiple drivers to a single
> > device these days, and I can't see a way to move this code to that
> > model, so oh well...

We should never let multiple drivers control the same piece of
hardware (in all cases where you would you can always split that piece
into smaller pieces, each controlled by its own driver). Input
intrefaces, on the other hand, are not drivers in regular sense, they
do not alter behavior of the underlying hardware. They just provide
different "views"/interfaces for the same device and because they
don't touch the hardware there can be many of them attached to the
same device. This is the crucial difference between them and normal

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at