#include <linux/i2c.h>
#include <linux/mdio/mdio-i2c.h>
#include <linux/phy.h>
#include <linux/sfp.h>
static bool i2c_mii_valid_phy_id(int phy_id)
{ … }
static unsigned int i2c_mii_phy_addr(int phy_id)
{ … }
static int i2c_mii_read_default_c45(struct mii_bus *bus, int phy_id, int devad,
int reg)
{ … }
static int i2c_mii_write_default_c45(struct mii_bus *bus, int phy_id,
int devad, int reg, u16 val)
{ … }
static int i2c_mii_read_default_c22(struct mii_bus *bus, int phy_id, int reg)
{ … }
static int i2c_mii_write_default_c22(struct mii_bus *bus, int phy_id, int reg,
u16 val)
{ … }
#define ROLLBALL_PHY_I2C_ADDR …
#define ROLLBALL_PASSWORD …
#define ROLLBALL_CMD_ADDR …
#define ROLLBALL_DATA_ADDR …
#define ROLLBALL_CMD_WRITE …
#define ROLLBALL_CMD_READ …
#define ROLLBALL_CMD_DONE …
#define SFP_PAGE_ROLLBALL_MDIO …
static int __i2c_transfer_err(struct i2c_adapter *i2c, struct i2c_msg *msgs,
int num)
{ … }
static int __i2c_rollball_get_page(struct i2c_adapter *i2c, int bus_addr,
u8 *page)
{ … }
static int __i2c_rollball_set_page(struct i2c_adapter *i2c, int bus_addr,
u8 page)
{ … }
static int i2c_transfer_rollball(struct i2c_adapter *i2c,
struct i2c_msg *msgs, int num)
{ … }
static int i2c_rollball_mii_poll(struct mii_bus *bus, int bus_addr, u8 *buf,
size_t len)
{ … }
static int i2c_rollball_mii_cmd(struct mii_bus *bus, int bus_addr, u8 cmd,
u8 *data, size_t len)
{ … }
static int i2c_mii_read_rollball(struct mii_bus *bus, int phy_id, int devad,
int reg)
{ … }
static int i2c_mii_write_rollball(struct mii_bus *bus, int phy_id, int devad,
int reg, u16 val)
{ … }
static int i2c_mii_init_rollball(struct i2c_adapter *i2c)
{ … }
struct mii_bus *mdio_i2c_alloc(struct device *parent, struct i2c_adapter *i2c,
enum mdio_i2c_proto protocol)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;