Re: [linux-pm] Re: [RFC] Some thoughts on device drivers and sysfs

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

 



On Tuesday 29 March 2005 00:03, Greg KH wrote:
> On Sun, Mar 27, 2005 at 02:24:59PM -0500, Adam Belay wrote:
> > One of the original design goals of sysfs was to provide a standardized
> > location to keep driver configuration attributes.  Although sysfs
> > handles this very well for bus devices and class devices, there isn't
> > currently a method to export attributes for device drivers and their
> > specific bound device instances to userspace.
> 
> Hm, what's device_create_file(), device_remove_file(), and DEVICE_ATTR()
> for?  A number of drivers use these functions today to add their own
> driver specific attributes to a device they control.
> 
> Then, userspace can just do a simple:
>         ls /sys/bus/pci/drivers/my_foo_driver/
> to see all devices on the PCI bus that are controlled by that driver.
> Then it can go into those directories and cat out the specific
> information if needed.

It probably would be nice if all driver-specific device attributes would be
grouped under /sys/devices/.../<blah_device>/drvattr/* so their names would
not clash with names of driver core attributes.

Unfortunately that would mean we are breaking userspace again...

-- 
Dmitry
-
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]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux