lkml.org 
[lkml]   [2003]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Displaying/modifying PCI device id tables via sysfs

> then there needs to be a simple way in sysfs to export an attribute
> hierarchy, beneath an object in the kobject hierarchy. Right now it's
> assumed that each kobject can have multiple attributes, but all are at a
> single level. Pat, is this hard to do?

It's 1 kobject == 1 sysfs directory. I recommend putting a kobject into
the ID structure and registering it (by the PCI core) once the driver has
been registered. Then, create files for each of the static IDs.

When new IDs are added, I don't see why you need to differentiate between
them in userspace. Couldn't you have e.g.:

/sys/bus/pci/drivers/3c59x/
`-- id
|-- 0
|-- 1
`-- new_id

Then, when someone writes a new ID, have:

/sys/bus/pci/drivers/3c59x/
`-- id
|-- 0
|-- 1
|-- 2
`-- new_id

Internally, we of course need to treat them differently, but to the user,
they're just IDs the driver supports..

-pat

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.050 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site