<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/pm_wakeup.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-11-19T17:06:49+00:00</updated>
<entry>
<title>PM: wakeup: Add out-of-band system wakeup support for devices</title>
<updated>2025-11-19T17:06:49+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2025-09-22T02:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4acbfb6c116be5989d5a0e38a48deca2d5b8bb92'/>
<id>urn:sha1:4acbfb6c116be5989d5a0e38a48deca2d5b8bb92</id>
<content type='text'>
Some devices can wake up the system from suspend even when their power
domains are turned off. This is possible because their system-wakeup logic
resides in an always-on power domain - indicating that they support
out-of-band system wakeup.

Currently, PM domain core doesn't power off such devices if they are marked
as system wakeup sources. To better represent devices with out-of-band
wakeup capability, this patch introduces a new flag out_band_wakeup in
'struct dev_pm_info'.

Two helper APIs are added:
 - device_set_out_band_wakeup() - to mark a device as having out-of-band
   wakeup capability.
 - device_out_band_wakeup() - to query the flag.

Allow the PM core and drivers to distinguish between regular and
out-of-band wakeup sources, enable more accurate power management decision.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: Do not expose 4 device wakeup source APIs</title>
<updated>2025-04-25T14:02:29+00:00</updated>
<author>
<name>Zijun Hu</name>
<email>quic_zijuhu@quicinc.com</email>
</author>
<published>2025-04-20T04:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=142ba31d8b4aff086c4f080bd97d437232922177'/>
<id>urn:sha1:142ba31d8b4aff086c4f080bd97d437232922177</id>
<content type='text'>
The following 4 APIs are only used by drivers/base/power/wakeup.c
internally.

- wakeup_source_create()
- wakeup_source_destroy()
- wakeup_source_add()
- wakeup_source_remove()

Do not expose them by making them as static functions.

Signed-off-by: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Link: https://lore.kernel.org/r/20250420-fix_power-v2-1-9b938d2283aa@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: Remove needless return in three void APIs</title>
<updated>2025-03-03T12:29:21+00:00</updated>
<author>
<name>Zijun Hu</name>
<email>quic_zijuhu@quicinc.com</email>
</author>
<published>2025-02-21T13:02:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=630d55e038728f6f5917da051984a5ec515d152e'/>
<id>urn:sha1:630d55e038728f6f5917da051984a5ec515d152e</id>
<content type='text'>
Remove needless 'return' in the following void APIs:

 __pm_wakeup_event()
 pm_wakeup_event()
 pm_wakeup_hard_event()

Since both the API and callee involved are void functions.

Signed-off-by: Zijun Hu &lt;quic_zijuhu@quicinc.com&gt;
Link: https://patch.msgid.link/20250221-rmv_return-v1-14-cc8dff275827@quicinc.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: implement devm_device_init_wakeup() helper</title>
<updated>2024-12-18T19:47:23+00:00</updated>
<author>
<name>Joe Hattori</name>
<email>joe@pf.is.s.u-tokyo.ac.jp</email>
</author>
<published>2024-12-18T04:09:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b317268368546d6401af788648668f82e3ba1bd3'/>
<id>urn:sha1:b317268368546d6401af788648668f82e3ba1bd3</id>
<content type='text'>
Some drivers that enable device wakeup fail to properly disable it
during their cleanup, which results in a memory leak.

To address this, introduce devm_device_init_wakeup(), a managed variant
of device_init_wakeup(dev, true).

With this managed helper, wakeup functionality will be automatically
disabled when the device is released, ensuring a more reliable cleanup
process.

This need for this addition arose during a previous discussion [1].

Link: https://lore.kernel.org/linux-rtc/20241212100403.3799667-1-joe@pf.is.s.u-tokyo.ac.jp/ [1]
Suggested-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Joe Hattori &lt;joe@pf.is.s.u-tokyo.ac.jp&gt;
Link: https://patch.msgid.link/20241218040935.1921416-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Improve consistency of '#error' directive messages</title>
<updated>2024-11-12T01:17:04+00:00</updated>
<author>
<name>Nataniel Farzan</name>
<email>natanielfarzan@gmail.com</email>
</author>
<published>2024-11-05T03:22:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7306f3c283bfe03611229bb6280987aae2af8f9'/>
<id>urn:sha1:a7306f3c283bfe03611229bb6280987aae2af8f9</id>
<content type='text'>
Remove the use of contractions and use proper punctuation in #error
directive messages that discourage the direct inclusion of header files.

Link: https://lkml.kernel.org/r/20241105032231.28833-1-natanielfarzan@gmail.com
Signed-off-by: Nataniel Farzan &lt;natanielfarzan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: Remove unnecessary else from device_init_wakeup()</title>
<updated>2024-04-03T14:51:37+00:00</updated>
<author>
<name>Dhruva Gole</name>
<email>d-gole@ti.com</email>
</author>
<published>2024-03-18T15:16:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3642c7ed52312ac2b95c9aba45c40e50bd8798ad'/>
<id>urn:sha1:3642c7ed52312ac2b95c9aba45c40e50bd8798ad</id>
<content type='text'>
Checkpatch warns that else is generally not necessary after a return
condition which exists in the if part of this function.

Hence, just to abide by what checkpatch recommends, follow it's
guidelines.

Signed-off-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: make device_wakeup_disable() return void</title>
<updated>2024-04-03T14:51:37+00:00</updated>
<author>
<name>Dhruva Gole</name>
<email>d-gole@ti.com</email>
</author>
<published>2024-03-18T15:16:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afde996a33ee4dbe3692e1eff28b56c820331428'/>
<id>urn:sha1:afde996a33ee4dbe3692e1eff28b56c820331428</id>
<content type='text'>
The device_wakeup_disable() call only returns an error if no dev exists,
but there's not much a user can do at that point.

Rather, make this function return void.

Signed-off-by: Dhruva Gole &lt;d-gole@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: sleep: Add helpers to allow a device to remain powered-on</title>
<updated>2023-08-22T20:03:43+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2023-08-10T16:21:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10bb4e4ab7dd3898f413b5b4a3b81f6e9b1f6bf5'/>
<id>urn:sha1:10bb4e4ab7dd3898f413b5b4a3b81f6e9b1f6bf5</id>
<content type='text'>
On some platforms a device and its corresponding PM domain, may need to
remain powered-on during system wide suspend, to support various use cases.
For example, when the console_suspend_enabled flag is unset for a serial
controller, the corresponding device may need to remain powered on. Other
use cases exists too.

In fact, we already have the mechanism in the PM core to deal with these
kind of use cases. However, the current naming of the corresponding
functions/flags clearly suggests these should be use for system wakeup.
See device_wakeup_path(), device_set_wakeup_path and
dev-&gt;power.wakeup_path.

As a way to extend the use of the existing mechanism, let's introduce two
new helpers functions, device_awake_path() and device_set_awake_path(). At
this point, let them act as wrappers of the existing functions. Ideally,
when all users have been converted to use the new helpers, we may decide to
drop the old ones and rename the flag.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: wakeup: Unify device_init_wakeup() for PM_SLEEP and !PM_SLEEP</title>
<updated>2022-07-05T18:48:46+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2022-06-07T03:51:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09d3154a6f0f0bb5b604832095804780f3684b96'/>
<id>urn:sha1:09d3154a6f0f0bb5b604832095804780f3684b96</id>
<content type='text'>
Previously the CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP device_init_wakeup()
implementations differed in confusing ways:

  - The PM_SLEEP version checked for a NULL device pointer and returned
    -EINVAL, while the !PM_SLEEP version did not and would simply
    dereference a NULL pointer.

  - When called with "false", the !PM_SLEEP version cleared "capable" and
    "enable" in the opposite order of the PM_SLEEP version.  That was
    harmless because for !PM_SLEEP they're simple assignments, but it's
    unnecessary confusion.

Use a simplified version of the PM_SLEEP implementation for both cases.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: sleep: Add dev_wakeup_path() helper</title>
<updated>2020-11-23T17:34:55+00:00</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@st.com</email>
</author>
<published>2020-11-19T07:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e1d9a737d00f2cc811dc5654f82c92c7d80e98c'/>
<id>urn:sha1:4e1d9a737d00f2cc811dc5654f82c92c7d80e98c</id>
<content type='text'>
Add dev_wakeup_path() helper to avoid to spread
dev-&gt;power.wakeup_path test in drivers.

Signed-off-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
