android_kernel_xiaomi_sm8350/arch/arm/mach-pxa
Johannes Berg fe0c935a6c rework pm_ops pm_disk_mode, kill misuse
This patch series cleans up some misconceptions about pm_ops.  Some users of
the pm_ops structure attempt to use it to stop the user from entering suspend
to disk, this, however, is not possible since the user can always use
"shutdown" in /sys/power/disk and then the pm_ops are never invoked.  Also,
platforms that don't support suspend to disk simply should not allow
configuring SOFTWARE_SUSPEND (read the help text on it, it only selects
suspend to disk and nothing else, all the other stuff depends on PM).

The pm_ops structure is actually intended to provide a way to enter
platform-defined sleep states (currently supported states are "standby" and
"mem" (suspend to ram)) and additionally (if SOFTWARE_SUSPEND is configured)
allows a platform to support a platform specific way to enter low-power mode
once everything has been saved to disk.  This is currently only used by ACPI
(S4).

This patch:

The pm_ops.pm_disk_mode is used in totally bogus ways since nobody really
seems to understand what it actually does.

This patch clarifies the pm_disk_mode description.

It also removes all the arm and sh users that think they can veto suspend to
disk via pm_ops; not so since the user can always do echo shutdown >
/sys/power/disk, they need to find a better way involving Kconfig or such.

ACPI is the only user left with a non-zero pm_disk_mode.

The patch also sets the default mode to shutdown again, but when a new pm_ops
is registered its pm_disk_mode is selected as default, that way the default
stays for ACPI where it is apparently required.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: <linux-pm@lists.linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30 16:40:40 -07:00
..
akita-ioexp.c WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
clock.c [ARM] Convert SA1111 to use clock architecture 2006-03-21 22:05:53 +00:00
corgi_lcd.c fix file specification in comments 2006-10-03 23:01:26 +02:00
corgi_pm.c [ARM] Yet more asm/apm-emulation.h stuff 2007-03-02 11:58:57 +00:00
corgi_ssp.c [ARM] 3760/1: This patch adds timeouts while working with SSP registers. Such timeouts were en 2006-08-27 12:54:56 +01:00
corgi.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
dma.c Initial blind fixup for arm for irq changes 2006-10-06 10:59:54 -07:00
generic.c [PATCH] GPIO API: PXA wrapper cleanup 2007-02-20 17:10:16 -08:00
generic.h
idp.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
irq.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
Kconfig kconfig: Standardize "depends" -> "depends on" in Kconfig files 2006-12-12 20:04:19 +01:00
leds-idp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
leds-lubbock.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
leds-mainstone.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
leds-trizeps4.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
leds.c [ARM] 3666/1: TRIZEPS4 [1/5] core 2006-06-29 16:25:37 +01:00
leds.h fix file specification in comments 2006-10-03 23:01:26 +02:00
lpd270.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
lubbock.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mainstone.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
Makefile [ARM] 3666/1: TRIZEPS4 [1/5] core 2006-06-29 16:25:37 +01:00
Makefile.boot
pm.c rework pm_ops pm_disk_mode, kill misuse 2007-04-30 16:40:40 -07:00
poodle.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
pxa25x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pxa27x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sharpsl_pm.c [ARM] Fix more apm-emulation.h 2007-02-26 21:04:29 +00:00
sharpsl.h
sleep.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
spitz_pm.c [ARM] Yet more asm/apm-emulation.h stuff 2007-03-02 11:58:57 +00:00
spitz.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
ssp.c Initial blind fixup for arm for irq changes 2006-10-06 10:59:54 -07:00
standby.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
time.c [PATCH] clocksource: fixup is_continous changes on ARM 2007-02-16 08:13:57 -08:00
tosa.c [ARM] 4249/1: Fix tosa compile failure 2007-03-08 13:33:58 +00:00
trizeps4.c [ARM] Remove empty fixup function 2006-12-13 14:48:36 +00:00