Messages in this thread | | | Date | Thu, 15 Sep 2005 23:16:59 +0200 | From | Vojtech Pavlik <> | Subject | Re: [patch 09/28] Input: convert net/bluetooth to dynamic input_dev allocation |
| |
On Thu, Sep 15, 2005 at 03:55:23PM -0500, Dmitry Torokhov wrote: > On 9/15/05, Vojtech Pavlik <vojtech@suse.cz> 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 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/
| |