Message ID | 20230130080714.139492-15-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2061805wrn; Mon, 30 Jan 2023 00:08:27 -0800 (PST) X-Google-Smtp-Source: AK7set+5imn+Sc3diG5ubSiZ8sXVWp7wIWH1ayNyIF9HvqwQTdnr5CIHOFL5RRz2t/+JGVL9BnRX X-Received: by 2002:a17:906:4ac5:b0:88a:a27c:c282 with SMTP id u5-20020a1709064ac500b0088aa27cc282mr342182ejt.47.1675066107756; Mon, 30 Jan 2023 00:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675066107; cv=none; d=google.com; s=arc-20160816; b=HyvyENmLYAXwMhGEyhpV6U/I3rv5ooeqpP/E3Wl9nNqjZ26zs8pX2M0OkI8ti8uroF j9QIMCboarTmIk4KKfoMRRbd1u7zbWCLqeuohvlPKHBr9fud1nJjaRIyV5kQidt4FJ9a rKyXRASEee3ZkwAZmLikjfKiItWIi1qDjGd78KcrRZDMHVGKFoDPKrcGBdufdcEyG/Pu Hnyi1SLp1WhgrDdnnE9+I6tVpQp68tNEoR4okXgb64Rvz9HGdcQmMhtDvtBZ5itNvCSD XfIFgOsCY7e/gbPz71YXxx5EDxZLkobRqMMMAJq/Jk4gcyTjcmGw6P94v/d61tbh/8E5 aGIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JklA5W44o4OCXhbfB8/N9lZg20pOgWREYl1gnTGHt0Q=; b=UNjFOuIA4yFAo8iBA3eJ59ZTBNv/q6BRCHs6bHZSX3049+6mkEorPfhAJ+oDQUHg/K bZbRqkRaZVpBqFUSK7rd1P50lwK7rlH3FxaubLpAFPqzQXUUZe1r5JUcwOPtgzSwLa9j 2r176hPObrI401F+Xw8KbFLTr5HrAd3MV2jRo7o69OW6MDiR6/YaVCVStkGH51ZG+0ch salbSBUUH3YAk9+ykEWEffxzKvp+728i6YTjCcGTPa9F7PPjcKZO4OFsR/l9x5sXaJq8 k/jPhXgfK3SUzIw1IKTQE/69dBAiDAFWZ9HLTxiJ+1gyNLhOWOuPyf3z6tjvftmrC0NF YUgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v9-20020a17090610c900b0084cc41e20e2si14305843ejv.624.2023.01.30.00.08.04; Mon, 30 Jan 2023 00:08:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235621AbjA3IHp (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Mon, 30 Jan 2023 03:07:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235575AbjA3IHc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 30 Jan 2023 03:07:32 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0588298C7 for <linux-kernel@vger.kernel.org>; Mon, 30 Jan 2023 00:07:29 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1pMPCB-0003f7-2i; Mon, 30 Jan 2023 09:07:19 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pMPCA-001Pvz-1n; Mon, 30 Jan 2023 09:07:17 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pMPC7-000aL2-Ot; Mon, 30 Jan 2023 09:07:15 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Woojung Huh <woojung.huh@microchip.com>, UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>, Vivien Didelot <vivien.didelot@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com Subject: [PATCH net-next v3 14/15] net: phy: add phy_has_smarteee() helper Date: Mon, 30 Jan 2023 09:07:13 +0100 Message-Id: <20230130080714.139492-15-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230130080714.139492-1-o.rempel@pengutronix.de> References: <20230130080714.139492-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756434119047670769?= X-GMAIL-MSGID: =?utf-8?q?1756434119047670769?= |
Series |
net: add EEE support for KSZ9477 and AR8035 with i.MX6
|
|
Commit Message
Oleksij Rempel
Jan. 30, 2023, 8:07 a.m. UTC
Add helper to identify PHYs with SmartEEE support.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
include/linux/phy.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h index 90d7b90fa1f4..9891f384de30 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1415,6 +1415,15 @@ static inline bool phy_polling_mode(struct phy_device *phydev) return phydev->irq == PHY_POLL; } +/** + * phy_has_rxtstamp - Tests whether a PHY supports SmartEEE. + * @phydev: the phy_device struct + */ +static inline bool phy_has_smarteee(struct phy_device *phydev) +{ + return phydev && phydev->drv && !!(phydev->drv->flags & PHY_SMART_EEE); +} + /** * phy_has_hwtstamp - Tests whether a PHY time stamp configuration. * @phydev: the phy_device struct