From nobody Wed Dec 17 10:43:31 2025 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74B64257828; Thu, 23 Oct 2025 09:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761210997; cv=none; b=hOqeYeG+mJHFLKEoyjcf7YcWkTpBlxMl9Rp6ws3jrBa2bdwdkEPeLZxfgUJ6lz/9TnXX2w5dnG/cejHbKrAuJzoHkej1BytOeGIObSEfMTVi+7VXNgPSnJ9ZDUDvyaV9+RhmNZ26HUH1CbAObba3h0YXpzpcvhZ+cfgf70n0DS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761210997; c=relaxed/simple; bh=8tY3bdFBnFAgO25anX3wP0+qH7Ke9IvNQaRNX8mW+ok=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=ToZw6Xuj5RTCQRl8cLBzRc6O4EK8m2tK4X+Qp0qEUhl5uYbCk4cJ3nzYGFY9XMQ3GLLQZblX6Mpk+OodHKrJKfGHGZdRwk43y/54zwz0kJi49QMLFuHWWzWE1zVZ2RIUa+UIEWkCQgFzEQz7eotHbwOBxi+ncHkKM/9HwWPXVYA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=BOjmGp7m; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="BOjmGp7m" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LlxgOL4iHOhRq2rg3Bphni6vekg4JHIOiNC2UJ8koDs=; b=BOjmGp7myOoyHmJURfM6X+Y6Pg KCRGtf92cVW6xC9FyDu4td6zv9dMlbvaTXyRqwsoJGlEaPf1K8JHf87g+TU8XVNNX97AsjCoTcBOn PaXL97A/Oy3+gu/EBHlp8XixgIAa0NkP0GQsdUWBTeHvkKuU7SsWCAfTRzMhArbczwcRBF/zS2C24 ZQ94WOp3EovPAy0bZDe7CA2OUAb9JBZKqJ1v0PIyCeNQ3wrxHYM0RiZGrDRDsZTx8LkLbw4LhsS+Q JxPnt0ob6Q5X7ZU34JLJnm3ovkDvnAWfD+xaY/KC3bSFhwNcH/DoGzORYGK4pzB45DFmUv/BYHgUL WMcWWFzA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:46440 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vBrQt-0000000060d-06iT; Thu, 23 Oct 2025 10:16:31 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vBrQs-0000000BLzI-0w3U; Thu, 23 Oct 2025 10:16:30 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , Christophe Roullier , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Rob Herring , Simon Horman , Tristram Ha Subject: [PATCH net-next v2 1/6] net: phy: add phy_can_wakeup() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Thu, 23 Oct 2025 10:16:30 +0100 Add phy_can_wakeup() to report whether the PHY driver has marked the PHY device as being wake-up capable as far as the driver model is concerned. Reviewed-by: Maxime Chevallier Reviewed-by: Florian Fainelli Signed-off-by: Russell King (Oracle) --- include/linux/phy.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index 3c7634482356..3eeeaec52832 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1379,6 +1379,18 @@ static inline void phy_disable_eee_mode(struct phy_d= evice *phydev, u32 link_mode linkmode_clear_bit(link_mode, phydev->advertising_eee); } =20 +/** + * phy_can_wakeup() - indicate whether PHY has driver model wakeup capabil= ities + * @phydev: The phy_device struct + * + * Returns: true/false depending on the PHY driver's device_set_wakeup_cap= able() + * setting. + */ +static inline bool phy_can_wakeup(struct phy_device *phydev) +{ + return device_can_wakeup(&phydev->mdio.dev); +} + void phy_resolve_aneg_pause(struct phy_device *phydev); void phy_resolve_aneg_linkmode(struct phy_device *phydev); =20 --=20 2.47.3