From nobody Sun Dec 14 19:20:14 2025 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 B7B291DE4E1; Sun, 14 Dec 2025 00:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765672892; cv=none; b=jT+LM4tT5ZQkjmcdR6GBrf3g8hyjy3+QjhBi+FyWCyrJcuZhJnc74np+yIdwGzoTwKrDfIdr6/iaW8sjQf9ARiqFx5yMmSh3ONWPdDNIbYrlt7RYlQ/s0VVm1NfHvtyiv2vuyghVLYFVU6lcLQS4mRHUHmmsHDX63qu94yyTQOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765672892; c=relaxed/simple; bh=aY8NAtWUqVKhLR07XxQLOeYBKEfdhVbWiz0T8CJqD1Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SIfzoO1nSBwsqTXBwIpdsRHdT5cPKTHgeJTeQILHwCat1nImKPNKPQ6oxP/0Cl9H5FUDe+iXli38smA1bNX4AoQIJOsHXwKCFzQMBtA2Hqnf7qUUg4w593aL4pSz6+oTT3bfv338iRLifP9+CmM6XVYxnIucTo3db/IG+/eDDbA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1vUaAw-000000006mX-2hEE; Sun, 14 Dec 2025 00:41:26 +0000 Date: Sun, 14 Dec 2025 00:41:23 +0000 From: Daniel Golle To: Daniel Golle , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Simon Horman , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Wunderlich , Chad Monroe , Cezary Wilmanski , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: [RFC PATCH v2 net-next 3/4] net: mdio: add unlocked mdiodev C45 bus accessors Message-ID: <552e004f6919e0dac90c9edc83120b84085309df.1765671579.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add helper inline functions __mdiodev_c45_read() and __mdiodev_c45_write(), which are the C45 equivalents of the existing __mdiodev_read() and __mdiodev_write() added by commit e6a45700e7e1 ("net: mdio: add unlocked mdiobus and mdiodev bus accessors") Signed-off-by: Daniel Golle --- RFC v2: add this patch, initial submission include/linux/mdio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 42d6d47e445b7..f39b4dba5cd4f 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -648,6 +648,19 @@ static inline int mdiodev_modify_changed(struct mdio_d= evice *mdiodev, mask, set); } =20 +static inline int __mdiodev_c45_read(struct mdio_device *mdiodev, int deva= d, + u16 regnum) +{ + return __mdiobus_c45_read(mdiodev->bus, mdiodev->addr, devad, regnum); +} + +static inline int __mdiodev_c45_write(struct mdio_device *mdiodev, u32 dev= ad, + u16 regnum, u16 val) +{ + return __mdiobus_c45_write(mdiodev->bus, mdiodev->addr, devad, regnum, + val); +} + static inline int mdiodev_c45_modify(struct mdio_device *mdiodev, int deva= d, u32 regnum, u16 mask, u16 set) { --=20 2.52.0