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

Vojtech Pavlik
2005-10-17T09:26:24Z

On Fri, Oct 14, 2005 at 10:45:54AM +0200, Kay Sievers wrote:

> Sure, than that physical (while that distinction is silly by itself)
> will just have several child devices. Look at the mouse0 and event0 in
> the ascii drawing.
>
> That solution would keep a better device separation, sure. But it is
> completely incompatible with everything we ever had in sysfs and
> nobody wants to rewrite _all_ userspace programs.
>
> It invents artificial subclass names below a "master" class, which is
> absolutely not needed.
>
> It creates the magic "interfaces" directory, which is confusing, cause
> it classifies devices by itself.
>
> It doesn't represent any relationship and hierarchy of devices and
> adding a forest of magic symlinks and "device" pointers is a very bad
> design. The proposed "inter-class" symlinks make it even harder to
> understand sysfs as it already is.
>
> The biggest problem with current sysfs is that the driver hacker has
> to decide if the device is "hardware" or "virtual" which in a lot of
> cases just can't tell and this distiction doesn't make any sense
> today.
>
> All the more complex subsystems use "virtual buses" and an unconnected
> bunch of class-devices to model its sysfs represention, which is just
> to work around a major design flaw in sysfs! We really should get
> _one_ device tree with its natural hierarchy, get rid of the stupid
> "device"-link, the PHYSDEVPATH and the unconnected class devices.
> Every device should just carry its dependency tree in it _own_
> devpath!
>
> I'm very sure, we want a unified tree in /sys/devices, regardless of
> the type of device, to represent the global hierarchy wich is exactly
> what you want to know from a device tree! That way we stack "virtual"
> _and_ "physical" in a sane manner and at the same time get very clean
> class interfaces. We would stop to mix up "hierarchy" and "classes"
> all over the tree.

Let me just say: I completely agree here. The hard distinction between
'real' and 'virtual' devices causes more problems than it solves.

--
Vojtech Pavlik
SuSE Labs, SuSE CR