1. 04 3月, 2014 1 次提交
    • R
      ACPI / PM: Resume runtime-suspended devices later during system suspend · 92858c47
      Rafael J. Wysocki 提交于
      Runtime-suspended devices are resumed during system suspend by
      acpi_subsys_prepare() for two reasons: First, because they may need
      to be reprogrammed in order to change their wakeup settings and,
      second, because they may need to be operatonal for their children
      to be successfully suspended.  That is a problem, though, if there
      are many runtime-suspended devices that need to be resumed this
      way during system suspend, because the .prepare() PM callbacks of
      devices are executed sequentially and the times taken by them
      accumulate, which may increase the total system suspend time quite
      a bit.
      
      For this reason, move the resume of runtime-suspended devices up
      to the next phase of device suspend (during system suspend), except
      for the ones that have power.ignore_children set.  The exception is
      made, because the devices with power.ignore_children set may still
      be necessary for their children to be successfully suspended (during
      system suspend) and they won't be resumed automatically as a result
      of the runtime resume of their children.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      92858c47
  2. 28 1月, 2014 1 次提交
  3. 23 11月, 2013 1 次提交
    • R
      ACPI / scan: Add acpi_device objects for all device nodes in the namespace · 202317a5
      Rafael J. Wysocki 提交于
      Modify the ACPI namespace scanning code to register a struct
      acpi_device object for every namespace node representing a device,
      processor and so on, even if the device represented by that namespace
      node is reported to be not present and not functional by _STA.
      
      There are multiple reasons to do that.  First of all, it avoids
      quite a lot of overhead when struct acpi_device objects are
      deleted every time acpi_bus_trim() is run and then added again
      by a subsequent acpi_bus_scan() for the same scope, although the
      namespace objects they correspond to stay in memory all the time
      (which always is the case on a vast majority of systems).
      
      Second, it will allow user space to see that there are namespace
      nodes representing devices that are not present at the moment and may
      be added to the system.  It will also allow user space to evaluate
      _SUN for those nodes to check what physical slots the "missing"
      devices may be put into and it will make sense to add a sysfs
      attribute for _STA evaluation after this change (that will be
      useful for thermal management on some systems).
      
      Next, it will help to consolidate the ACPI hotplug handling among
      subsystems by making it possible to store hotplug-related information
      in struct acpi_device objects in a standard common way.
      
      Finally, it will help to avoid a race condition related to the
      deletion of ACPI namespace nodes.  Namely, namespace nodes may be
      deleted as a result of a table unload triggered by _EJ0 or _DCK.
      If a hotplug notification for one of those nodes is triggered
      right before the deletion and it executes a hotplug callback
      via acpi_hotplug_execute(), the ACPI handle passed to that
      callback may be stale when the callback actually runs.  One way
      to work around that is to always pass struct acpi_device pointers
      to hotplug callbacks after doing a get_device() on the objects in
      question which eliminates the use-after-free possibility (the ACPI
      handles in those objects are invalidated by acpi_scan_drop_device(),
      so they will trigger ACPICA errors on attempts to use them).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      202317a5
  4. 15 11月, 2013 2 次提交
    • R
      ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro · 3a83f992
      Rafael J. Wysocki 提交于
      Since DEVICE_ACPI_HANDLE() is now literally identical to
      ACPI_HANDLE(), replace it with the latter everywhere and drop its
      definition from include/acpi.h.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a83f992
    • R
      ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node · 7b199811
      Rafael J. Wysocki 提交于
      Modify struct acpi_dev_node to contain a pointer to struct acpi_device
      associated with the given device object (that is, its ACPI companion
      device) instead of an ACPI handle corresponding to it.  Introduce two
      new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
      ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
      ACPI_HANDLE() macro to take the above changes into account.
      Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
      use ACPI_COMPANION_SET() instead.  For some of them who used to
      pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
      introduce a helper routine acpi_preset_companion() doing an
      equivalent thing.
      
      The main motivation for doing this is that there are things
      represented by struct acpi_device objects that don't have valid
      ACPI handles (so called fixed ACPI hardware features, such as
      power and sleep buttons) and we would like to create platform
      device objects for them and "glue" them to their ACPI companions
      in the usual way (which currently is impossible due to the
      lack of valid ACPI handles).  However, there are more reasons
      why it may be useful.
      
      First, struct acpi_device pointers allow of much better type checking
      than void pointers which are ACPI handles, so it should be more
      difficult to write buggy code using modified struct acpi_dev_node
      and the new macros.  Second, the change should help to reduce (over
      time) the number of places in which the result of ACPI_HANDLE() is
      passed to acpi_bus_get_device() in order to obtain a pointer to the
      struct acpi_device associated with the given "physical" device,
      because now that pointer is returned by ACPI_COMPANION() directly.
      Finally, the change should make it easier to write generic code that
      will build both for CONFIG_ACPI set and unset without adding explicit
      compiler directives to it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
      7b199811
  5. 17 10月, 2013 1 次提交
  6. 11 10月, 2013 1 次提交
    • M
      ACPI / PM: allow child devices to ignore parent power state · 644f17ad
      Mika Westerberg 提交于
      Some serial buses like I2C and SPI don't require that the parent device is
      in D0 before any of its children transitions to D0, but instead the parent
      device can control its own power independently from the children.
      
      This does not follow the ACPI specification as it requires the parent to be
      powered on before its children. However, Windows seems to ignore this
      requirement so I think we can do the same in Linux.
      
      Implement this by adding a new power flag 'ignore_parent' to struct
      acpi_device.  If this flag is set the ACPI core ignores checking of the
      parent device power state when the device is powered on/off.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      644f17ad
  7. 04 8月, 2013 1 次提交
  8. 31 7月, 2013 1 次提交
  9. 30 7月, 2013 2 次提交
  10. 04 7月, 2013 1 次提交
    • R
      ACPI / PM: Fix corner case in acpi_bus_update_power() · 91bdad0b
      Rafael J. Wysocki 提交于
      The role of acpi_bus_update_power() is to update the given ACPI
      device object's power.state field to reflect the current physical
      state of the device (as inferred from the configuration of power
      resources and _PSC, if available).  For this purpose it calls
      acpi_device_set_power() that should update the power resources'
      reference counters and set power.state as appropriate.  However,
      that doesn't work if the "new" state is D1, D2 or D3hot and the
      the current value of power.state means D3cold, because in that
      case acpi_device_set_power() will refuse to transition the device
      from D3cold to non-D0.
      
      To address this problem, make acpi_bus_update_power() call
      acpi_power_transition() directly to update the power resources'
      reference counters and only use acpi_device_set_power() to put
      the device into D0 if the current physical state of it cannot
      be determined.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      91bdad0b
  11. 28 6月, 2013 1 次提交
  12. 20 6月, 2013 4 次提交
    • R
      ACPI / LPSS: Power up LPSS devices during enumeration · b9e95fc6
      Rafael J. Wysocki 提交于
      Commit 7cd8407d (ACPI / PM: Do not execute _PS0 for devices without
      _PSC during initialization) introduced a regression on some systems
      with Intel Lynxpoint Low-Power Subsystem (LPSS) where some devices
      need to be powered up during initialization, but their device objects
      in the ACPI namespace have _PS0 and _PS3 only (without _PSC or power
      resources).
      
      To work around this problem, make the ACPI LPSS driver power up
      devices it knows about by using a new helper function
      acpi_device_fix_up_power() that does all of the necessary
      sanity checks and calls acpi_dev_pm_explicit_set() to put the
      device into D0.
      Reported-and-tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b9e95fc6
    • R
      ACPI / PM: Rework and clean up acpi_dev_pm_get_state() · fa1675b5
      Rafael J. Wysocki 提交于
      The acpi_dev_pm_get_state() function defined in device_pm.c is quite
      convoluted, which isn't really necessary, and it doesn't validate the
      values returned by the ACPI methods executed by it appropriately.
      
      To address these shortcomings modify it in the following way.
      
       (1) Make its return value only mean whether or not it succeeded and
           pass the device power states determined by it through pointers.
      
       (2) Drop the d_max_in argument, used by only one of its callers,
           from it, and move the code related to d_max_in into that caller,
           acpi_pm_device_sleep_state().
      
       (3) Make it always check the return value of acpi_evaluate_integer()
           and handle failures as appropriate.  Moreover, make it check if
           the values returned by the executed ACPI methods are not out of
           range.
      
       (4) Make it check if the values returned by the executed ACPI
           methods represent valid power states of the given device and
           handle situations in which that's not the case gracefully.
      
      Also update the kerneldoc comments of acpi_dev_pm_get_state() and
      acpi_pm_device_sleep_state() to reflect the code changes.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fa1675b5
    • R
      ACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c · 4c164ae7
      Rafael J. Wysocki 提交于
      The two symbols ACPI_STATE_D3 and ACPI_STATE_D3_COLD actually
      represent the same number (4), but ACPI_STATE_D3 is slightly
      ambigugous, because it may not be clear that it really means D3cold
      and not D3hot at first sight.
      
      Remove that ambiguity from drivers/acpi/device_pm.c by making it
      use ACPI_STATE_D3_COLD everywhere instead of ACPI_STATE_D3.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4c164ae7
    • R
      ACPI / PM: Rename function acpi_device_power_state() and make it static · b25c77ef
      Rafael J. Wysocki 提交于
      There is a name clash between function acpi_device_power_state()
      defined in drivers/acpi/device_pm.c and structure type
      acpi_device_power_state defined in include/acpi/acpi_bus.h, which
      may be resolved by renaming the function.  Additionally, that
      funtion may be made static, because it is not used anywhere outside
      of the file it is defined in.
      
      Rename acpi_device_power_state() to acpi_dev_pm_get_state(), which
      better reflects its purpose, and make it static.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b25c77ef
  13. 07 6月, 2013 1 次提交
  14. 04 6月, 2013 1 次提交
  15. 22 5月, 2013 1 次提交
    • R
      ACPI / PM: Allow device power states to be used for CONFIG_PM unset · ec4602a9
      Rafael J. Wysocki 提交于
      Currently, drivers/acpi/device_pm.c depends on CONFIG_PM and all of
      the functions defined in there are replaced with static inline stubs
      if that option is unset.  However, CONFIG_PM means, roughly, "runtime
      PM or suspend/hibernation support" and some of those functions are
      useful regardless of that.  For example, they are used by the ACPI
      fan driver for controlling fans and acpi_device_set_power() is called
      during device removal.  Moreover, device initialization may depend on
      setting device power states properly.
      
      For these reasons, make the routines manipulating ACPI device power
      states defined in drivers/acpi/device_pm.c available for CONFIG_PM
      unset too.
      Reported-by: NZhang Rui <rui.zhang@intel.com>
      Reported-and-tested-by: NMichel Lespinasse <walken@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      ec4602a9
  16. 25 3月, 2013 1 次提交
    • R
      ACPI / PM: Fix potential problem in acpi_device_get_power() · 75eb2d13
      Rafael J. Wysocki 提交于
      Theoretically, in some situations acpi_device_get_power() may return
      an incorrect result, because the settings of the power resources
      depended on by the device may indicate a power state shallower than
      the actual power state of the device.
      
      Say that two devices, A and B, depend on two power resources, X and
      Y, in such a way that _PR0 for both A and B list both X and Y and
      _PR3 for both A and B list power resource Y alone.  Also suppose
      that _PS0 and _PS3 are present for both A and B.  Then, if devices
      A and B are initially in D0, power resources X and Y are initially
      "on" and their reference counters are equal to 2.  To put device A
      into power state D3hot the kernel will decrement the reference
      counter of power resource X, but that power resource won't be turned
      off, because it is still in use by device B (its reference counter is
      equal to 1).  Next, _PS3 will be executed for device A.  Afterward
      the configuration of the power resources will indicate that device
      A is in power state D0 (both X and Y are "on"), but in fact it is
      in D3hot (because _PS3 has been executed for it).
      
      In that situation, if acpi_device_get_power() is called to get the
      power state of device A, it will first execute _PSC for it which
      should return 3.  That will cause acpi_device_get_power() to run
      acpi_power_get_inferred_state() for device A and the resultant power
      state will be D0, which is incorrect.
      
      To fix that change acpi_device_get_power() to first execute
      acpi_power_get_inferred_state() for the given device (if it
      depends on power resources) and to evaluate _PSC for it subsequently,
      so that the result inferred from the power resources configuration
      can be amended by the _PSC return value.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NAaron Lu <aaron.lu@intel.com>
      75eb2d13
  17. 03 2月, 2013 1 次提交
    • R
      ACPI / PM: Handle missing _PSC in acpi_bus_update_power() · 511d5c42
      Rafael J. Wysocki 提交于
      If _PS0 is defined for an ACPI device node, but _PSC isn't and
      the device node doesn't use power resources for power management,
      acpi_bus_update_power() will fail to update the power state of it,
      because acpi_device_get_power() returns ACPI_STATE_UNKNOWN in that
      case.
      
      To handle that situation make acpi_bus_update_power() follow
      acpi_bus_init_power() and try to force the given device node into
      power state D0.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      511d5c42
  18. 02 2月, 2013 1 次提交
    • R
      ACPI / PM: Do not power manage devices in unknown initial states · b3785492
      Rafael J. Wysocki 提交于
      In general, for ACPI device power management to work, the initial
      power states of devices must be known (otherwise, we wouldn't be able
      to keep track of power resources, for example).  Hence, if it is
      impossible to determine the initial ACPI power states of some
      devices, they can't be regarded as power-manageable using ACPI.
      
      For this reason, modify acpi_bus_get_power_flags() to clear the
      power_manageable flag if acpi_bus_init_power() fails and add some
      extra fallback code to acpi_bus_init_power() to cover broken
      BIOSes that provide _PS0/_PS3 without _PSC for some devices.
      
      Verified to work on my HP nx6325 that has this problem.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NPeter Wu <lekensteyn@gmail.com>
      b3785492
  19. 01 2月, 2013 1 次提交
  20. 22 1月, 2013 5 次提交
    • R
      ACPI / PM: Fix device power state value after transitions to D3cold · e5656271
      Rafael J. Wysocki 提交于
      When a transition to the D3cold power state is requested,
      acpi_device_set_power() first carries out a transition to D3hot and
      then turns off the device's power resources.  However, it fails to
      update the device's power.state field appropriately and D3hot is
      stored in it as a result.
      
      Fix this, but make sure that the device's power state will be
      D3hot if its power resources cannot be turned off in the final
      step.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e5656271
    • R
      ACPI / PM: Use string "D3cold" to represent ACPI_STATE_D3_COLD · 898fee4f
      Rafael J. Wysocki 提交于
      Make acpi_power_state_string() return "D3cold" as the string
      representation of ACPI power state D3cold instead of "D3" returned
      currently, which is confusing.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      898fee4f
    • R
      ACPI / PM: Always evaluate _PSn after setting power resources · e78adb75
      Rafael J. Wysocki 提交于
      The ACPI specitication (ACPI 5, Sections 7.2.8 - 7.2.11) requires
      that the _PSn (n = 0..3) method, if present, be executed after the
      power resources for the given device power state have been set
      appropriately.  However, acpi_device_set_power() does that only
      if the new power state is going to be higher-power (lower-number)
      than the power state the device is in already.  Otherwise, the
      ordering is reverse to protect against situations in which _PSn
      might access device registers unavailable after configuring the
      power resources for power state Dn (D3 meaning D3hot).
      
      Such situations are very unlikely to happen, though, and _PSn may
      actually be implemented with the assumption that power resources
      have been configured for power state Dn in advance, so change the
      code to follow the specification literally.
      
      This change was previously porposed in a different form by Lv Zheng.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e78adb75
    • R
      ACPI / PM: Introduce helper for executing _PSn methods · 9c0f45e3
      Rafael J. Wysocki 提交于
      To reduce code duplication between acpi_device_set_power() and
      acpi_bus_init_power(), introduce a new helper function for executing
      ACPI devices' _PSn (n = 0..3) methods, acpi_dev_pm_explicit_set().
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9c0f45e3
    • R
      ACPI / PM: Make acpi_bus_init_power() more robust · a2367807
      Rafael J. Wysocki 提交于
      The ACPI specification requires the _PSC method to be present under
      a device object if its power state cannot be inferred from the states
      of power resources used by it (ACPI 5, Section 7.6.2).  However, it
      also requires that (for power states D0-D2 and D3hot) if the _PSn
      (n = 0, 1, 2, 3) method is present under the device object, it also
      must be executed after the power resources have been set
      appropriately for the device to go into power state Dn (D3 means
      D3hot in this case).  Thus it is not clear from the specification
      whether or not the _PSn method should be executed if the initial
      configuraion of power resources used by the device indicates power
      state Dn and the _PSC method is not present.
      
      The current implementation of acpi_bus_init_power() is based on the
      assumption that it should not be necessary to execute _PSn in the
      above situation, but experience shows that in fact that assumption
      need not be satisfied.  For this reason, make acpi_bus_init_power()
      always execute _PSn if the initial configuration of device power
      resources indicates power state Dn.
      Reported-and-tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a2367807
  21. 20 1月, 2013 2 次提交
  22. 17 1月, 2013 1 次提交
    • R
      ACPI / PM: Rework the handling of devices depending on power resources · bc9b6407
      Rafael J. Wysocki 提交于
      Commit 0090def6 (ACPI: Add interface to register/unregister device
      to/from power resources) made it possible to indicate to the ACPI
      core that if the given device depends on any power resources, then
      it should be resumed as soon as all of the power resources required
      by it to transition to the D0 power state have been turned on.
      
      Unfortunately, however, this was a mistake, because all devices
      depending on power resources should be treated this way (i.e. they
      should be resumed when all power resources required by their D0
      state have been turned on) and for the majority of those devices
      the ACPI core can figure out by itself which (physical) devices
      depend on what power resources.
      
      For this reason, replace the code added by commit 0090def6 with a
      new, much more straightforward, mechanism that will be used
      internally by the ACPI core and remove all references to that code
      from kernel subsystems using ACPI.
      
      For the cases when there are (physical) devices that should be
      resumed whenever a not directly related ACPI device node goes into
      D0 as a result of power resources configuration changes, like in
      the SATA case, add two new routines, acpi_dev_pm_add_dependent()
      and acpi_dev_pm_remove_dependent(), allowing subsystems to manage
      such dependencies.  Convert the SATA subsystem to use the new
      functions accordingly.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bc9b6407
  23. 03 1月, 2013 2 次提交
  24. 26 11月, 2012 1 次提交
  25. 15 11月, 2012 5 次提交
    • R
      ACPI / PM: Provide ACPI PM callback routines for subsystems · e5cc8ef3
      Rafael J. Wysocki 提交于
      Some bus types don't support power management natively, but generally
      there may be device nodes in ACPI tables corresponding to the devices
      whose bus types they are (under ACPI 5 those bus types may be SPI,
      I2C and platform).  If that is the case, standard ACPI power
      management may be applied to those devices, although currently the
      kernel has no means for that.
      
      For this reason, provide a set of routines that may be used as power
      management callbacks for such devices.  This may be done in three
      different ways.
      
       (1) Device drivers handling the devices in question may run
           acpi_dev_pm_attach() in their .probe() routines, which (on
           success) will cause the devices to be added to the general ACPI
           PM domain and ACPI power management will be used for them going
           forward.  Then, acpi_dev_pm_detach() may be used to remove the
           devices from the general ACPI PM domain if ACPI power management
           is not necessary for them any more.
      
       (2) The devices' subsystems may use acpi_subsys_runtime_suspend(),
           acpi_subsys_runtime_resume(), acpi_subsys_prepare(),
           acpi_subsys_suspend_late(), acpi_subsys_resume_early() as their
           power management callbacks in the same way as the general ACPI
           PM domain does that.
      
       (3) The devices' drivers may execute acpi_dev_suspend_late(),
           acpi_dev_resume_early(), acpi_dev_runtime_suspend(),
           acpi_dev_runtime_resume() from their power management callbacks
           as appropriate, if that's absolutely necessary, but it is not
           recommended to do that, because such drivers may not work
           without ACPI support as a result.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e5cc8ef3
    • R
      ACPI / PM: Move device PM functions related to sleep states · a6ae7594
      Rafael J. Wysocki 提交于
      Introduce helper function returning the target sleep state of the
      system and use it to move the remaining device power management
      functions from sleep.c to device_pm.c.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a6ae7594
    • R
      ACPI / PM: Split device wakeup management routines · dee8370c
      Rafael J. Wysocki 提交于
      Two device wakeup management routines in device_pm.c and sleep.c,
      acpi_pm_device_run_wake() and acpi_pm_device_sleep_wake(), take a
      device pointer argument and use it to obtain the ACPI handle of the
      corresponding ACPI namespace node.  That handle is then used to get
      the address of the struct acpi_device object corresponding to the
      struct device passed as the argument.
      
      Unfortunately, that last operation may be costly, because it involves
      taking the global ACPI namespace mutex, so it shouldn't be carried
      out too often.  However, the callers of those routines usually call
      them in a row with acpi_pm_device_sleep_state() which also takes that
      mutex for the same reason, so it would be more efficient if they ran
      acpi_bus_get_device() themselves to obtain a pointer to the struct
      acpi_device object in question and then passed that pointer to the
      appropriate PM routines.
      
      To make that possible, split each of the PM routines mentioned above
      in two parts, one taking a struct acpi_device pointer argument and
      the other implementing the current interface for compatibility.
      
      Additionally, change acpi_pm_device_run_wake() to actually return
      an error code if there is an error while setting up runtime remote
      wakeup for the device.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dee8370c
    • R
      ACPI / PM: Move runtime remote wakeup setup routine to device_pm.c · cd7bd02d
      Rafael J. Wysocki 提交于
      The ACPI function for setting up devices to do runtime remote
      wakeup is now located in drivers/acpi/sleep.c, but
      drivers/acpi/device_pm.c is a more logical place for it, so move it
      there.
      
      No functional changes should result from this modification.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cd7bd02d
    • R
      ACPI / PM: Move device power state selection routine to device_pm.c · 86b3832c
      Rafael J. Wysocki 提交于
      The ACPI function for choosing device power state is now located
      in drivers/acpi/sleep.c, but drivers/acpi/device_pm.c is a more
      logical place for it, so move it there.
      
      However, instead of moving the function entirely, move its core only
      under a different name and with a different list of arguments, so
      that it is more flexible, and leave a wrapper around it in the
      original location.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      86b3832c