summaryrefslogtreecommitdiff
path: root/include/linux/sysdev.h
AgeCommit message (Collapse)Author
2005-04-16[PATCH] pm_message_t: more fixes in common and i386Pavel Machek
I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately that turned out not to be the case as Russel King pointed out. Here are fixes for Documentation and common code (mainly system devices). Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-02-18[PATCH] sys_device_[un]register() are not syscallsRandy Dunlap
sys_xyz() names in Linux are all syscalls... except for sys_device_register() and sys_device_unregister(). This patch renames them so that the sys_ namespace is once again used only by syscalls.
2003-08-19[power] Update device handling.Patrick Mochel
- From conversations with Ben Herrenschmidt. Most devices should be able to handle powering down with interrupts enabled, which I already assume. But since suspending will stop I/O transactions before the call to power it off (making the device unusable anyway), there is no need to separate the calls - we may as well make it simpler for driver authors and require that driver authors do everything at the same time. There will always be devices that need to either power down or power up the device with interrupts disabled. They will get called with interrupts enabled, but may return -EAGAIN to be called again with interrupts disabled to do what they need to do. System devices are now always called only with interrupts disabled. Come on - they're system devices. Of course we need interrupts disabled.
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.