diff options
| author | Patrick Mochel <mochel@osdl.org> | 2002-09-23 01:19:20 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-09-23 01:19:20 -0700 |
| commit | 8b755139164c05fcff5e56617d2fa9886fea1825 (patch) | |
| tree | ed799f52ca7cdc216bb36510a726a6e58664d5cd /include/linux/vmalloc.h | |
| parent | 94eda0969bf8f7ea58872e5c1069e2c0b203e877 (diff) | |
Driver model: improve support for system devices.
- Create struct sys_device to describe system-level devices (CPUs, PICs, etc.). This
structure includes a 'name' and 'id' field for drivers to fill in with a simple
canonical name (like 'pic' or 'floppy') and the id of the device relative to its
discovery in the system (it's enumerated value).
The core then constructs the bus_id for the device from these, giving them meaningful
names when exporting them to userspace:
# tree -d /sys/root/sys/
/sys/root/sys/
|-- pic0
`-- rtc0
- Replace
int register_sys_device(struct device * dev);
with
int sys_device_register(struct sys_device * sysdev);
- Fixup the users of the API.
- Add a system_bus_type for devices to associate themselves with. This provides a
bus/system/ directory in driverfs that looks like:
# tree -d /sys/bus/system/
/sys/bus/system/
|-- devices
| |-- pic0 -> ../../../root/sys/pic0
| `-- rtc0 -> ../../../root/sys/rtc0
`-- drivers
`-- pic
Diffstat (limited to 'include/linux/vmalloc.h')
0 files changed, 0 insertions, 0 deletions
