@@ -256,6 +256,14 @@ config MDIO_BCM_IPROC
This module provides a driver for the MDIO busses found in the
Broadcom iProc SoC's.
+comment "MDIO devices"
+
+config MDIO_NOP
+ tristate "linux MDIO NOP driver"
+ help
+ MDIO driver which does nothing, other than test the MDIO framework.
+ Say No, unless you are testing the framework.
+
endif # PHYLIB
config MICREL_KS8995MA
@@ -42,3 +42,4 @@ obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o
obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
obj-$(CONFIG_MICROCHIP_PHY) += microchip.o
obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o
+obj-$(CONFIG_MDIO_NOP) += mdio-nop.o
new file mode 100644
@@ -0,0 +1,37 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/mdio.h>
+
+static int mdio_nop_probe(struct mdio_device *mdiodev)
+{
+ dev_info(&mdiodev->dev, "mdio_nop_probe for address %d\n",
+ mdiodev->addr);
+
+ return 0;
+}
+
+static void mdio_nop_remove(struct mdio_device *mdiodev)
+{
+ dev_info(&mdiodev->dev, "mdio_nop_remove for address %d\n",
+ mdiodev->addr);
+}
+
+static const struct of_device_id mdio_nop_ids[] = {
+ { .compatible = "linux,mdio-nop" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, mdio_nop_ids);
+
+struct mdio_driver mdio_nop_drv = {
+ .probe = mdio_nop_probe,
+ .remove = mdio_nop_remove,
+ .mdiodrv = {
+ .driver = {
+ .name = "mdio-nop",
+ .of_match_table = mdio_nop_ids,
+ },
+ },
+};
+
+mdio_module_driver(mdio_nop_drv);