From: Roman Stratiienko <r.stratiienko@gmail.com>
To: linux-pm@vger.kernel.org
Cc: rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org,
rui.zhang@intel.com, linux-kernel@vger.kernel.org, megi@xff.cz,
Roman Stratiienko <r.stratiienko@gmail.com>
Subject: [RFC] thermal/core: Disable uevent messages for cooling devices
Date: Sun, 10 Jul 2022 19:40:26 +0300 [thread overview]
Message-ID: <20220710164026.541466-1-r.stratiienko@gmail.com> (raw)
During suspend, the big CPU cluster is turned off first while a little
is still running. This forcibly unregisters the cooling device which
sends a "REMOVE" uevent to all subscribers [1].
In case userspace netlink subscriber has set the EPOLLWAKEUP flag, a
wakeup event is triggered that causes suspend to be aborted.
Without this change, suspend doesn't work on PinePhone PRO with AOSP
userland.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5c238a8b599f1ae25eaeb08ad0e9e13e2b9eb023
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
---
drivers/thermal/thermal_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index cdc0552e8c42e..e6b21f2792a85 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -925,6 +925,7 @@ __thermal_cooling_device_register(struct device_node *np,
cdev->device.class = &thermal_class;
cdev->devdata = devdata;
thermal_cooling_device_setup_sysfs(cdev);
+ dev_set_uevent_suppress(&cdev->device, true);
ret = device_register(&cdev->device);
if (ret)
goto out_kfree_type;
--
2.34.1
next reply other threads:[~2022-07-10 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-10 16:40 Roman Stratiienko [this message]
2024-04-08 18:48 ` John Stultz
2024-04-08 18:59 ` Roman Stratiienko
2024-04-08 19:03 ` John Stultz
2024-04-08 19:38 ` John Stultz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220710164026.541466-1-r.stratiienko@gmail.com \
--to=r.stratiienko@gmail.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=megi@xff.cz \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®