]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/phy/mdio-i2c: Move header file to include/linux/mdio
authorAndrew Lunn <andrew@lunn.ch>
Thu, 27 Aug 2020 02:00:29 +0000 (04:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:46 +0000 (07:52 +0100)
[ Upstream commit 879a00d2b32cf39e1673406598151de277a71cc8 ]

In preparation for moving all MDIO drivers into drivers/net/mdio, move
the mdio-i2c header file into include/linux/mdio so it can be used by
both the MDIO driver and the SFP code which instantiates I2C MDIO
busses.

v2:
Add include/linux/mdio

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 7083df59abbc ("net: mdio-mux-meson-g12a: force internal PHY off on mux switch")
Signed-off-by: Sasha Levin <sashal@kernel.org>
MAINTAINERS
drivers/net/phy/mdio-i2c.c
drivers/net/phy/mdio-i2c.h [deleted file]
drivers/net/phy/sfp.c
include/linux/mdio/mdio-i2c.h [new file with mode: 0644]

index 973fcc9143d1eef4b2aab73116a530c83bdd5408..ea8f1c8850892d5de0280a0a62bd85ce7ce4737f 100644 (file)
@@ -14661,6 +14661,7 @@ L:      netdev@vger.kernel.org
 S:     Maintained
 F:     drivers/net/phy/phylink.c
 F:     drivers/net/phy/sfp*
+F:     include/linux/mdio/mdio-i2c.h
 F:     include/linux/phylink.h
 F:     include/linux/sfp.h
 K:     phylink
index 0dce676725488a645be0b42b7cdc07802a172339..5969878e0aa7c31d32fda838408995b78a741c1d 100644 (file)
  * of their settings.
  */
 #include <linux/i2c.h>
+#include <linux/mdio/mdio-i2c.h>
 #include <linux/phy.h>
 
-#include "mdio-i2c.h"
-
 /*
  * I2C bus addresses 0x50 and 0x51 are normally an EEPROM, which is
  * specified to be present in SFP modules.  These correspond with PHY
diff --git a/drivers/net/phy/mdio-i2c.h b/drivers/net/phy/mdio-i2c.h
deleted file mode 100644 (file)
index 751dab2..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * MDIO I2C bridge
- *
- * Copyright (C) 2015 Russell King
- */
-#ifndef MDIO_I2C_H
-#define MDIO_I2C_H
-
-struct device;
-struct i2c_adapter;
-struct mii_bus;
-
-struct mii_bus *mdio_i2c_alloc(struct device *parent, struct i2c_adapter *i2c);
-
-#endif
index beaa00342a13f602a316969951dda90e4587adb2..9639aa18196850a63a6f53ae15f0c8f153b8f37f 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/jiffies.h>
+#include <linux/mdio/mdio-i2c.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/of.h>
@@ -16,7 +17,6 @@
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 
-#include "mdio-i2c.h"
 #include "sfp.h"
 #include "swphy.h"
 
diff --git a/include/linux/mdio/mdio-i2c.h b/include/linux/mdio/mdio-i2c.h
new file mode 100644 (file)
index 0000000..751dab2
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * MDIO I2C bridge
+ *
+ * Copyright (C) 2015 Russell King
+ */
+#ifndef MDIO_I2C_H
+#define MDIO_I2C_H
+
+struct device;
+struct i2c_adapter;
+struct mii_bus;
+
+struct mii_bus *mdio_i2c_alloc(struct device *parent, struct i2c_adapter *i2c);
+
+#endif