From: "Russell King (Oracle)" <rmk+kernel@armlinux•org.uk>
To: Jose Abreu <Jose.Abreu@synopsys•com>
Cc: Andrew Lunn <andrew@lunn•ch>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Heiner Kallweit <hkallweit1@gmail•com>,
Jakub Kicinski <kuba@kernel•org>,
netdev@vger•kernel.org, Paolo Abeni <pabeni@redhat•com>
Subject: [PATCH net-next 1/2] net: mdio: add mdiodev_c45_(read|write)
Date: Tue, 08 Nov 2022 14:25:56 +0000 [thread overview]
Message-ID: <E1osPY4-002SMk-03@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Y2pm13+SDg6N/IVx@shell.armlinux.org.uk>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux•org.uk>
---
include/linux/mdio.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 00177567cfef..f7fbbf3069e7 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -488,6 +488,19 @@ static inline int mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad,
return mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum), val);
}
+static inline int mdiodev_c45_read(struct mdio_device *mdiodev, int devad,
+ u16 regnum)
+{
+ return mdiobus_c45_read(mdiodev->bus, mdiodev->addr, devad, regnum);
+}
+
+static inline int mdiodev_c45_write(struct mdio_device *mdiodev, u32 devad,
+ u16 regnum, u16 val)
+{
+ return mdiobus_c45_write(mdiodev->bus, mdiodev->addr, devad, regnum,
+ val);
+}
+
int mdiobus_register_device(struct mdio_device *mdiodev);
int mdiobus_unregister_device(struct mdio_device *mdiodev);
bool mdiobus_is_registered_device(struct mii_bus *bus, int addr);
--
2.30.2
next prev parent reply other threads:[~2022-11-08 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 14:25 [PATCH net-next 0/2] Clean up pcs-xpcs accessors Russell King (Oracle)
2022-11-08 14:25 ` Russell King (Oracle) [this message]
2022-11-08 15:39 ` [PATCH net-next 1/2] net: mdio: add mdiodev_c45_(read|write) Andrew Lunn
2022-11-08 14:26 ` [PATCH net-next 2/2] net: pcs: xpcs: use mdiodev accessors Russell King (Oracle)
2022-11-08 15:40 ` Andrew Lunn
2022-11-10 4:00 ` [PATCH net-next 0/2] Clean up pcs-xpcs accessors patchwork-bot+netdevbpf
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=E1osPY4-002SMk-03@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux$(echo .)org.uk \
--cc=Jose.Abreu@synopsys$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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