Re: [PATCHSET 3/4] sysfs: divorce sysfs from kobject and driver model

Alan Stern
2007-10-10T15:39:03Z

On Tue, 9 Oct 2007, Greg KH wrote:

> The rules for sysfs files are the following:
> - one value, in text format, per file.
> - no action apon open/close
> - binary files are only allowed for "pass-through" type files
> that the kernel does not touch (like for firmware and pci
> config space)
> - directories should be associated with a kobject where it makes
> sense (no nesting deep subdirectories without a kobject
> present)

You have to stretch this a little for the power/ subdirectory every
device gets. The only kobject it corresponds to is the one in the
device, which already corresponds to the parent directory.

Alan Stern