#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mdio.h>
#include <linux/phy.h>
#include <linux/of.h>
#include "lan9303.h"
#define PHY_ADDR(x) …
#define PHY_REG(x) …
struct lan9303_mdio { … };
static void lan9303_mdio_real_write(struct mdio_device *mdio, int reg, u16 val)
{ … }
static int lan9303_mdio_write(void *ctx, uint32_t reg, uint32_t val)
{ … }
static u16 lan9303_mdio_real_read(struct mdio_device *mdio, int reg)
{ … }
static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
{ … }
static int lan9303_mdio_phy_write(struct lan9303 *chip, int addr, int reg,
u16 val)
{ … }
static int lan9303_mdio_phy_read(struct lan9303 *chip, int addr, int reg)
{ … }
static const struct lan9303_phy_ops lan9303_mdio_phy_ops = …;
static const struct regmap_config lan9303_mdio_regmap_config = …;
static int lan9303_mdio_probe(struct mdio_device *mdiodev)
{ … }
static void lan9303_mdio_remove(struct mdio_device *mdiodev)
{ … }
static void lan9303_mdio_shutdown(struct mdio_device *mdiodev)
{ … }
static const struct of_device_id lan9303_mdio_of_match[] = …;
MODULE_DEVICE_TABLE(of, lan9303_mdio_of_match);
static struct mdio_driver lan9303_mdio_driver = …;
mdio_module_driver(lan9303_mdio_driver);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;