]> git.baikalelectronics.ru Git - kernel.git/commit
PM / core: Add SMART_SUSPEND driver flag
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 26 Oct 2017 10:12:08 +0000 (12:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 6 Nov 2017 12:57:01 +0000 (13:57 +0100)
commit1cefa76bfd582fd74e66a46bebb6f0eb06ac47ee
tree28017e02257ab291f966247ad61d37e670c0a320
parent9b38f806d90c7d9d36223ce677c39750a907d5ff
PM / core: Add SMART_SUSPEND driver flag

Define and document a SMART_SUSPEND flag to instruct bus types and PM
domains that the system suspend callbacks provided by the driver can
cope with runtime-suspended devices, so from the driver's perspective
it should be safe to leave devices in runtime suspend during system
suspend.

Setting that flag may also cause middle-layer code (bus types,
PM domains etc.) to skip invocations of the ->suspend_late and
->suspend_noirq callbacks provided by the driver if the device
is in runtime suspend at the beginning of the "late" phase of
the system-wide suspend transition, in which case the driver's
system-wide resume callbacks may be invoked back-to-back with
its ->runtime_suspend callback, so the driver has to be able to
cope with that too.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Documentation/driver-api/pm/devices.rst
drivers/base/power/main.c
include/linux/pm.h