Re: [patch 09/28] Input: convert net/bluetooth to dynamic input_dev allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 15, 2005 at 03:55:23PM -0500, Dmitry Torokhov wrote:
> On 9/15/05, Vojtech Pavlik <[email protected]> wrote:
> > On Thu, Sep 15, 2005 at 02:22:34PM -0500, Dmitry Torokhov wrote:
> > > They are devices - class devices :). I have the following distinction
> > > in my head - "normal" devices (bus devices) are real hardware devices
> > > and their drivers need to do resource and/or power management. Class
> > > devices represent virtual devices - some kind of abstraction - that
> > > unify and combine "real" devices from several buses into one class.
> > 
> > Yes. While input drivers do need to care about power management usually,
> > the input device abstraction itself doesn't have to, which makes it
> > indeed a special kind of a device.
> > 
> 
> Right. They just signal to underlying hardware driver when they are in
> use (open), but the actual power management is left to the specific
> bus/driver, not input core.
> 
> > I was always wondering whether the distinction between bus/class was
> > needed, as the border isn't very clear.
> > 
> 
> Classes combine devices which are logically the same, i.e. they
> perform similar functions. Buses combine devices that are perform
> different functions but have similar hardware interface. For example a
> network cards - it is a class. You can have network card sit on a PCI,
> USB, ISA buses but for the rest of the kernel they are accesses
> through netdev abstraction. At least this is my understanding of our
> device model ;)
 
Especially with things like Ethernet - there is not much difference
between it and other busses like SCSI. Both the Ethernet card and the
SCSI card give access to a bus behind them, they're in fact just
bridges.

You can have a harddrive sitting on both SCSI and Ethernet (iSCSI), and
there even is an IP-over-SCSI patch somewhere that allows connecting two
machines with a SCSI cable.

Similarly, you can have USB on PCI and on ISA. There will be two
different USB controllers in different places in the bus hierarchy. Yet
they can be accessed through the same means, something that would make
them a class.

[I'm playing a bit of a devil's advocate here - I see what the
distinction is trying to achieve.]

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux