Messages in this thread | | | Date | Tue, 4 Mar 2003 08:10:55 -0600 (CST) | From | Patrick Mochel <> | Subject | Re: 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/
| |