linux/drivers
Rafael J. Wysocki 1eede070a5 Introduce new top level suspend and hibernation callbacks
Introduce 'struct pm_ops' and 'struct pm_ext_ops' ('ext' meaning
'extended') representing suspend and hibernation operations for bus
types, device classes, device types and device drivers.

Modify the PM core to use 'struct pm_ops' and 'struct pm_ext_ops'
objects, if defined, instead of the ->suspend(), ->resume(),
->suspend_late(), and ->resume_early() callbacks (the old callbacks
will be considered as legacy and gradually phased out).

The main purpose of doing this is to separate suspend (aka S2RAM and
standby) callbacks from hibernation callbacks in such a way that the
new callbacks won't take arguments and the semantics of each of them
will be clearly specified.  This has been requested for multiple
times by many people, including Linus himself, and the reason is that
within the current scheme if ->resume() is called, for example, it's
difficult to say why it's been called (ie. is it a resume from RAM or
from hibernation or a suspend/hibernation failure etc.?).

The second purpose is to make the suspend/hibernation callbacks more
flexible so that device drivers can handle more than they can within
the current scheme.  For example, some drivers may need to prevent
new children of the device from being registered before their
->suspend() callbacks are executed or they may want to carry out some
operations requiring the availability of some other devices, not
directly bound via the parent-child relationship, in order to prepare
for the execution of ->suspend(), etc.

Ultimately, we'd like to stop using the freezing of tasks for suspend
and therefore the drivers' suspend/hibernation code will have to take
care of the handling of the user space during suspend/hibernation.
That, in turn, would be difficult within the current scheme, without
the new ->prepare() and ->complete() callbacks.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10 10:59:50 -07:00
..
accessibility Kconfig: improved help for CONFIG_ACCESSIBILITY 2008-05-08 10:46:55 -07:00
acorn/char
acpi acpi: fix integer as NULL pointer warning 2008-05-23 08:11:06 -07:00
amba Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ata libata: fix G5 SATA broken on -rc5 2008-06-05 08:36:37 -07:00
atm drivers/atm/: remove CVS keywords 2008-05-20 14:52:25 -07:00
auxdisplay cfag12864b fix 2007-08-22 19:52:46 -07:00
base Introduce new top level suspend and hibernation callbacks 2008-06-10 10:59:50 -07:00
block Add 'rd' alias to new brd ramdisk driver 2008-06-05 14:23:12 -07:00
bluetooth hci_usb.h: fix hard-to-trigger race 2008-05-02 16:45:10 -07:00
cdrom [POWERPC] iSeries: Remove unused mail address 2008-05-23 16:45:04 +10:00
char ipwireless: Fix blocked sending 2008-06-06 11:31:02 -07:00
clocksource tclib: Fix compile warnings 2008-03-13 22:53:29 +01:00
connector connector: convert to single-threaded workqueue 2008-03-23 21:51:12 -07:00
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2008-06-09 11:27:55 -07:00
cpuidle cpuidle: fix 100% C0 statistics regression 2008-03-26 00:58:19 -04:00
crypto [CRYPTO] padlock-aes: Use generic setkey function 2008-04-21 10:19:34 +08:00
dca DCA: convert struct class_device to struct device. 2008-02-08 15:33:33 -08:00
dio dio: ARRAY_SIZE() cleanup 2008-02-05 09:44:23 -08:00
dma iop-adma: fixup some kzalloc/memset confusions 2008-05-20 13:51:20 -07:00
edac edac: mpc85xx: fix building as a module 2008-05-24 09:56:13 -07:00
eisa signedness: module_param_array nump argument 2007-10-14 12:41:52 -07:00
firewire firewire: prevent userspace from accessing shut down devices 2008-05-20 18:24:17 +02:00
firmware edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
gpio gpiolib: fix off by one errors 2008-05-24 09:56:11 -07:00
hid HID: remove CVS keywords 2008-05-20 16:44:43 +02:00
hwmon hdaps: fix module loading on Thinkpad T61P 2008-06-06 11:29:13 -07:00
i2c i2c/max6875: Really prevent 24RF08 corruption 2008-05-18 20:49:41 +02:00
ide ide: fix race in device_create 2008-05-20 13:31:54 -07:00
ieee1394 ieee1394: sbp2: use correct size of command descriptor block 2008-05-20 18:24:17 +02:00
infiniband IB/core: Remove IB_DEVICE_SEND_W_INV capability flag 2008-06-09 09:58:42 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-05-30 10:17:19 -07:00
isdn isdn: fix integer as NULL pointer warning 2008-05-23 08:11:06 -07:00
leds LEDS: fix race in device_create 2008-05-20 13:31:55 -07:00
lguest virtio: set device index in common code. 2008-05-30 15:09:42 +10:00
macintosh [POWERPC] macintosh: Replace deprecated __initcall with device_initcall 2008-05-15 20:50:00 +10:00
mca proc: remove proc_root from drivers 2008-04-29 08:06:18 -07:00
md md: do not compute parity unless it is on a failed drive 2008-06-06 11:29:08 -07:00
media V4L/DVB (8001): dib0070: fix dib0070_attach when !CONFIG_DVB_TUNER_DIB0070 2008-06-05 10:26:21 -03:00
memstick memstick: convert struct class_device to struct device 2008-04-19 19:10:29 -07:00
message [SCSI] fusion mpt: fix target missing after resetting external raid 2008-05-27 10:58:09 -05:00
mfd HTC_EGPIO is ARM-only 2008-05-21 16:56:00 -07:00
misc fujitsu-laptop: autoload module on Lifebook P1510D 2008-06-06 11:29:09 -07:00
mmc mmc: Fix crash in mmc_block on 64-bit 2008-06-05 16:14:17 -07:00
mtd Merge git://git.infradead.org/~dwmw2/mtd-2.6.26 2008-06-06 11:31:18 -07:00
net [POWERPC] ehea: Remove dependency on MEMORY_HOTPLUG 2008-06-09 11:32:44 +10:00
nubus proc: convert /proc/bus/nubus to seq_file interface 2008-04-29 08:06:19 -07:00
of rtc-ds1374: rename device to just "ds1374" 2008-06-06 11:29:10 -07:00
oprofile oprofile: don't request cache line alignment for cpu_buffer 2008-05-14 19:11:12 -07:00
parisc drivers/parisc: replace remaining __FUNCTION__ occurrences 2008-05-15 10:38:54 -04:00
parport debugobjects: add timer specific object debugging code 2008-04-30 08:29:53 -07:00
pci PCI/MSI: skip calling pci_find_capability from msi_set_mask_bits 2008-06-10 10:59:49 -07:00
pcmcia electra_cf: Add MODULE_DEVICE_TABLE() 2008-05-27 16:07:45 -05:00
pnp PNP: skip UNSET MEM resources as well as DISABLED ones 2008-06-05 10:30:37 -07:00
power power_supply: Fix race in power_supply_uevent 2008-06-10 02:13:51 +04:00
ps3 [POWERPC] PS3: Remove unsupported wakeup sources 2008-05-02 15:00:44 +10:00
rapidio [RAPIDIO] Auto-probe the RapidIO system size 2008-04-29 19:40:28 +10:00
rtc rtc: class driver for ppc_md RTC functions 2008-06-06 11:29:13 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2008-05-30 10:20:03 -07:00
sbus sbus bpp: instances missed in s/dev_name/bpp_dev_name/ 2008-05-21 16:55:59 -07:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2008-06-04 08:36:09 -07:00
serial Blackfin serial driver: fix up tty core set_ldisc API change breakage bug 2008-06-07 15:36:33 +08:00
sh maple: fix device detection 2008-02-26 14:12:09 +09:00
sn ioc3.c: replace remaining __FUNCTION__ occurrences 2008-03-17 08:11:48 -04:00
spi spi: fix refcount-related spidev oops-on-rmmod 2008-06-06 11:29:08 -07:00
ssb ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable 2008-06-04 15:57:10 -04:00
tc lk201: remove obsolete driver 2007-10-17 08:42:57 -07:00
telephony telephony: phonedev panics if unregistering device not registered [Bug 9266] 2007-11-05 15:12:33 -08:00
thermal thermal: re-name thermal.c to thermal_sys.c 2008-04-29 03:12:17 -04:00
uio UIO: fix race in device_create 2008-05-20 13:31:55 -07:00
usb usb: r8a66597-hcd: Add support for SH7723 USB host 2008-06-09 16:04:12 +09:00
video fbdev: export symbol fb_mode_option 2008-06-06 11:29:12 -07:00
virtio virtio: force callback on empty. 2008-05-30 15:09:46 +10:00
w1 drivers: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:53 -07:00
watchdog drivers/watchdog/geodewdt.c: build fix 2008-05-30 10:16:58 -07:00
xen xen: add balloon driver 2008-04-24 23:57:33 +02:00
zorro zorro: use non-racy method for proc entries creation 2008-04-29 08:06:21 -07:00
Kconfig Basic braille screen reader support 2008-04-30 08:29:52 -07:00
Makefile Basic braille screen reader support 2008-04-30 08:29:52 -07:00