Re: Displaying/modifying PCI device id tables via sysfs

From: Patrick Mochel (mochel@osdl.org)
Date: Tue Mar 04 2003 - 09:10:55 EST


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



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:24 EST