summaryrefslogtreecommitdiff
path: root/include/linux/sysdev.h
AgeCommit message (Collapse)Author
2003-06-15[driver model] Remove struct sys_device::entryPatrick Mochel
It was added by accident from another patch and is redundant with struct sys_device::kobj.entry.
2003-06-11[driver model] Make sure system device drivers are added if registered late.Patrick Mochel
From Jeremy Fitzhardinge: With the current system device changes (I picked them up in 2.5.70-mm8), the system device class assumes that all system device drivers are registered before any system devices are registered. Unfortunately, this is often not the case. CPU devices are registered very early, but cpufreq registers drivers for them; since cpufreq drivers can be loaded as modules, they clearly can't be registered before the device is. This patch keeps a list of all registered devices hanging off the system device class. When a new driver is registered, it calls the driver's add() function with all existing devices. Conversely, when a driver is unregistered, it calls the driver's remove() function for all existing devices so the driver can clean up. Note: the list in the class's embedded kset is used, rather than creating a new field.
2003-06-09[driver model] Add save() and restore() methods for system device drivers. Patrick Mochel
It turns out that at least some system device drivers need to allocate memory and/or sleep for one reason or another when either saving or restoring state. Instead of adding a 'level' paramter to the suspend() and resume() methods, which I despise and think is a horrible programming interface, two new methods have been added to struct sysdev_driver: int (*save)(struct sys_device *, u32 state); int (*restore)(struct sys_device *); that are called explicitly before and after suspend() and resume() respectively, with interrupts enabled. This gives the drivers the flexibility to allocate memory and sleep, if necessary.
2003-06-09[driver model] Create include/linux/sysdev.h and define sysdev_attribute.Patrick Mochel
Split out all system device definitions from device.h into their own header sysdev.h Define struct sysdev_attribute and define functions to export attributes in sysfs.