#include <linux/bitfield.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/hwmon.h>
#include <linux/marvell_phy.h>
#include <linux/phy.h>
#include <linux/sfp.h>
#include <linux/netdevice.h>
#define MV_PHY_ALASKA_NBT_QUIRK_MASK …
#define MV_PHY_ALASKA_NBT_QUIRK_REV …
#define MV_VERSION(a,b,c,d) …
enum { … };
struct mv3310_mactype { … };
struct mv3310_chip { … };
struct mv3310_priv { … };
static const struct mv3310_chip *to_mv3310_chip(struct phy_device *phydev)
{ … }
#ifdef CONFIG_HWMON
static umode_t mv3310_hwmon_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static int mv3310_hwmon_read_temp_reg(struct phy_device *phydev)
{ … }
static int mv2110_hwmon_read_temp_reg(struct phy_device *phydev)
{ … }
static int mv3310_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *value)
{ … }
static const struct hwmon_ops mv3310_hwmon_ops = …;
static u32 mv3310_hwmon_chip_config[] = …;
static const struct hwmon_channel_info mv3310_hwmon_chip = …;
static u32 mv3310_hwmon_temp_config[] = …;
static const struct hwmon_channel_info mv3310_hwmon_temp = …;
static const struct hwmon_channel_info * const mv3310_hwmon_info[] = …;
static const struct hwmon_chip_info mv3310_hwmon_chip_info = …;
static int mv3310_hwmon_config(struct phy_device *phydev, bool enable)
{ … }
static int mv3310_hwmon_probe(struct phy_device *phydev)
{ … }
#else
static inline int mv3310_hwmon_config(struct phy_device *phydev, bool enable)
{
return 0;
}
static int mv3310_hwmon_probe(struct phy_device *phydev)
{
return 0;
}
#endif
static int mv3310_power_down(struct phy_device *phydev)
{ … }
static int mv3310_power_up(struct phy_device *phydev)
{ … }
static int mv3310_reset(struct phy_device *phydev, u32 unit)
{ … }
static int mv3310_get_downshift(struct phy_device *phydev, u8 *ds)
{ … }
static int mv3310_set_downshift(struct phy_device *phydev, u8 ds)
{ … }
static int mv3310_get_edpd(struct phy_device *phydev, u16 *edpd)
{ … }
static int mv3310_set_edpd(struct phy_device *phydev, u16 edpd)
{ … }
static int mv3310_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
{ … }
static const struct sfp_upstream_ops mv3310_sfp_ops = …;
static int mv3310_probe(struct phy_device *phydev)
{ … }
static void mv3310_remove(struct phy_device *phydev)
{ … }
static int mv3310_suspend(struct phy_device *phydev)
{ … }
static int mv3310_resume(struct phy_device *phydev)
{ … }
static bool mv3310_has_pma_ngbaset_quirk(struct phy_device *phydev)
{ … }
static int mv2110_get_mactype(struct phy_device *phydev)
{ … }
static int mv2110_set_mactype(struct phy_device *phydev, int mactype)
{ … }
static int mv2110_select_mactype(unsigned long *interfaces)
{ … }
static int mv3310_get_mactype(struct phy_device *phydev)
{ … }
static int mv3310_set_mactype(struct phy_device *phydev, int mactype)
{ … }
static int mv3310_select_mactype(unsigned long *interfaces)
{ … }
static const struct mv3310_mactype mv2110_mactypes[] = …;
static const struct mv3310_mactype mv3310_mactypes[] = …;
static const struct mv3310_mactype mv3340_mactypes[] = …;
static void mv3310_fill_possible_interfaces(struct phy_device *phydev)
{ … }
static int mv3310_config_init(struct phy_device *phydev)
{ … }
static int mv3310_get_features(struct phy_device *phydev)
{ … }
static int mv3310_config_mdix(struct phy_device *phydev)
{ … }
static int mv3310_config_aneg(struct phy_device *phydev)
{ … }
static int mv3310_aneg_done(struct phy_device *phydev)
{ … }
static void mv3310_update_interface(struct phy_device *phydev)
{ … }
static int mv3310_read_status_10gbaser(struct phy_device *phydev)
{ … }
static int mv3310_read_status_copper(struct phy_device *phydev)
{ … }
static int mv3310_read_status(struct phy_device *phydev)
{ … }
static int mv3310_get_tunable(struct phy_device *phydev,
struct ethtool_tunable *tuna, void *data)
{ … }
static int mv3310_set_tunable(struct phy_device *phydev,
struct ethtool_tunable *tuna, const void *data)
{ … }
static bool mv3310_has_downshift(struct phy_device *phydev)
{ … }
static void mv3310_init_supported_interfaces(unsigned long *mask)
{ … }
static void mv3340_init_supported_interfaces(unsigned long *mask)
{ … }
static void mv2110_init_supported_interfaces(unsigned long *mask)
{ … }
static void mv2111_init_supported_interfaces(unsigned long *mask)
{ … }
static const struct mv3310_chip mv3310_type = …;
static const struct mv3310_chip mv3340_type = …;
static const struct mv3310_chip mv2110_type = …;
static const struct mv3310_chip mv2111_type = …;
static int mv3310_get_number_of_ports(struct phy_device *phydev)
{ … }
static int mv3310_match_phy_device(struct phy_device *phydev)
{ … }
static int mv3340_match_phy_device(struct phy_device *phydev)
{ … }
static int mv211x_match_phy_device(struct phy_device *phydev, bool has_5g)
{ … }
static int mv2110_match_phy_device(struct phy_device *phydev)
{ … }
static int mv2111_match_phy_device(struct phy_device *phydev)
{ … }
static void mv3110_get_wol(struct phy_device *phydev,
struct ethtool_wolinfo *wol)
{ … }
static int mv3110_set_wol(struct phy_device *phydev,
struct ethtool_wolinfo *wol)
{ … }
static struct phy_driver mv3310_drivers[] = …;
module_phy_driver(mv3310_drivers);
static struct mdio_device_id __maybe_unused mv3310_tbl[] = …;
MODULE_DEVICE_TABLE(mdio, mv3310_tbl);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;