From nobody Mon Sep 14 19:48:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hkG0b4RPLz6rcqq for ; Mon, 14 Sep 2026 19:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hkG0b1ZdRz4XHT for ; Mon, 14 Sep 2026 19:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789415295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=veTvhStS0OwxylgUOXWHuvb2oeRumff+9+ZBtJEukts=; b=mkacLY5u7ShHhRCPhMUpqAWaYnc+fv2y2JnEi3ZlMu8jqYTVP9M/gS/yqcwTYdC8DuXd8x st/zkU4dUY0pLXKZm8p6ezdRu3GWH2HXBjW0vEe9pJZfSZFnpx0jzGQQtTDfmDo1aBID40 xsVgbxbnirSFpPx73OtnieiSOUcNaPqftJ3TOmGdv1wQoSVCW6o8Vn9xMUKjXWPVDk6req HUjwV+eP1/fVimHTJymhZLhD7khao9lxCY+xCBow6JB2JNFTigE8yq9Bwp34EPBRMQakmp Cvan94slV1VHcD6SrAjQ0aVkDAbLn4R+8qWA+AR1h8eYFbX5NOCGBIwpDWmKPA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789415295; b=NwVGXvjWJVTE4zYz8Lsm0roN+CwjkAZffuRBZGed86xBsj2THTITvMD8yIlC2g6+tyC3Uf 5B8i3EmRlWqPBPHuE1gpOYl/UL3gvlbWVv5R+vCedlnZDH4iaqRGN9dk09JvfJd6MLbha1 +QEHwGsrGhnqwEo95Sh217nzg+Aq3RrXy12CHh7dU+FnUNL/+zFTvjZP+qCj3p0TPpoFZO pwHbDaX4wz29eBrIU9S2nKnYPJ+RaRDJayzfaig5EHVS0/kK5yyX/pUBrtgU0NSvkbV+JL mTi0XqLKihqPLA1qcz2ztxmR4bw+PKKileaKSNfe2ye1y0njlpBV5prQsAwpZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789415295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=veTvhStS0OwxylgUOXWHuvb2oeRumff+9+ZBtJEukts=; b=La+xR83gLAEw60Ysi/JQRWj9j2Zu7ZSiO6mqpxq7j3CgeL8C6KajAR/XKrBKwToG8fhk6t 5WPj1zvft/F/e8809xzf64K2Ao4vn6/T7MH5QpRgPZLhG9OR7VOPmz5G0Gw5DvRJdGF8Pe Ph+QovR40QG0NpeGu7Mt9OrAt92aeUvDAmn9UpbvLsJ4QVztEwUAxtMwvb1QB/ymYnkHof +9ZGXo5yh2iFQLiiq/t2Mqfh6ELavqeRTeP3CXDy4OvlCplwFY83gCsD0JIZt8k6nx3jxJ /A9n/vUJBbCv1InKFNAeazq3wyMBQfCmeZqBHHyaLBiX8/iRR9SIt1A/T9Vc0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hkG0b0GBpzRQZ for ; Mon, 14 Sep 2026 19:48:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2548e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 14 Sep 2026 19:48:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: a424fb3519eb - main - LinuxKPI: add can_wakeup option and accessor functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a424fb3519ebf8fb972e7ba45ba19df322992b00 Auto-Submitted: auto-generated Date: Mon, 14 Sep 2026 19:48:15 +0000 Message-Id: <6aa84f7f.2548e.bc9bf78@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a424fb3519ebf8fb972e7ba45ba19df322992b00 commit a424fb3519ebf8fb972e7ba45ba19df322992b00 Author: Bjoern A. Zeeb AuthorDate: 2026-08-16 22:05:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-09-14 19:06:01 +0000 LinuxKPI: add can_wakeup option and accessor functions We can implement device_set_wakeup_capable() in the !CONFIG_PM_SLEEP case; we do not have the infrastructure in place for the CONFIG_PM_SLEEP case so leave a pr_debug TODO. Needed by an upcoming wireless driver. MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D58883 --- sys/compat/linuxkpi/common/include/linux/pm.h | 17 +++++++++++++++++ sys/compat/linuxkpi/common/src/linux_compat.c | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 932697e0eda8..baf1c152a310 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -49,6 +49,7 @@ struct dev_pm_domain { struct dev_pm_info { atomic_t usage_count; + bool can_wakeup; }; #define PM_EVENT_FREEZE 0x0001 @@ -111,4 +112,20 @@ pm_vt_switch_unregister(struct device *dev __unused) { } +#ifdef CONFIG_PM_SLEEP +static inline void +device_set_wakeup_capable(struct device *dev __unused, bool capable __unused) +{ + pr_debug("%s: TODO\n", __func__); +} +#else +void linuxkpi_device_set_wakeup_capable(struct device *, bool); + +static inline void +device_set_wakeup_capable(struct device *dev, bool capable) +{ + linuxkpi_device_set_wakeup_capable(dev, capable); +} +#endif + #endif /* _LINUXKPI_LINUX_PM_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 12e5852c8dc9..8fb09d5914fb 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2833,6 +2833,12 @@ device_can_wakeup(struct device *dev) return (false); } +void +linuxkpi_device_set_wakeup_capable(struct device *dev, bool capable) +{ + dev->power.can_wakeup = capable; +} + static void devm_device_group_remove(struct device *dev, void *p) {