1. 02 2月, 2008 1 次提交
    • R
      Suspend: Introduce begin() and end() callbacks · c697eece
      Rafael J. Wysocki 提交于
      On ACPI systems the target state set by acpi_pm_set_target() is
      reset by acpi_pm_finish(), but that need not be called if the
      suspend fails.  All platforms that use the .set_target() global
      suspend callback are affected by analogous issues.
      
      For this reason, we need an additional global suspend callback that
      will reset the target state regardless of whether or not the suspend
      is successful.  Also, it is reasonable to rename the .set_target()
      callback, since it will be used for a different purpose on ACPI
      systems (due to ACPI 1.0x code ordering requirements).
      
      Introduce the global suspend callback .end() to be executed at the
      end of the suspend sequence and rename the .set_target() global
      suspend callback to .begin().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c697eece
  2. 26 1月, 2008 1 次提交
  3. 19 10月, 2007 2 次提交
  4. 02 7月, 2007 1 次提交
    • R
      PM: introduce set_target method in pm_ops · 2391dae3
      Rafael J. Wysocki 提交于
      Commit 52ade9b3 changed the suspend code
      ordering to execute pm_ops->prepare() after the device model per-device
      .suspend() calls in order to fix some ACPI-related issues.  Unfortunately, it
      broke the at91 platform which assumed that pm_ops->prepare() would be called
      before suspending devices.
      
      at91 used pm_ops->prepare() to get notified of the target system sleep state,
      so that it could use this information while suspending devices.  However, with
      the current suspend code ordering pm_ops->prepare() is called too late for
      this purpose.  Thus, at91 needs an additional method in 'struct pm_ops' that
      will be used for notifying the platform of the target system sleep state.
      Moreover, in the future such a method will also be needed by ACPI.
      
      This patch adds the .set_target() method to 'struct pm_ops' and makes the
      suspend code call it, if implemented, before executing the device model
      per-device .suspend() calls.  It also modifies the at91 code to use
      pm_ops->set_target() instead of pm_ops->prepare().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2391dae3
  5. 03 6月, 2007 1 次提交
  6. 01 5月, 2007 1 次提交
    • J
      rework pm_ops pm_disk_mode, kill misuse · fe0c935a
      Johannes Berg 提交于
      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: NJohannes Berg <johannes@sipsolutions.net>
      Cc: David Brownell <david-b@pacbell.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: <linux-pm@lists.linux-foundation.org>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fe0c935a
  7. 08 2月, 2007 2 次提交
  8. 01 12月, 2006 3 次提交
  9. 28 9月, 2006 1 次提交
  10. 21 6月, 2006 1 次提交
    • A
      [ARM] 3605/1: AT91RM9200 Power Management · 907d6deb
      Andrew Victor 提交于
      Patch from Andrew Victor
      
      This patch adds the core Power Management support for the AT91RM9200
      processor.  It will support suspend-to-RAM and standby modes.
      
      The suspend-to-RAM functionality is not 100% complete.  The code that
      needs to be execute from the internal SRAM to restore the system is
      outstanding.  For now we just fall through to Standby mode.
      
      The AT91-specific at91_suspend_entering_slow_clock() function will
      eventually be replaced by clk_must_disable() once that functionality is
      added to mainline clock API.
      
      Patch from David Brownell.
      Signed-off-by: NAndrew Victor <andrew@sanpeople.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      907d6deb