linux/drivers/net/phy/microchip.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2015 Microchip Technology
 */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/phy.h>
#include <linux/microchipphy.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <dt-bindings/net/microchip-lan78xx.h>

#define PHY_ID_LAN937X_TX

#define LAN937X_MODE_CTRL_STATUS_REG
#define LAN937X_AUTOMDIX_EN
#define LAN937X_MDI_MODE

#define DRIVER_AUTHOR
#define DRIVER_DESC

struct lan88xx_priv {};

static int lan88xx_read_page(struct phy_device *phydev)
{}

static int lan88xx_write_page(struct phy_device *phydev, int page)
{}

static int lan88xx_phy_config_intr(struct phy_device *phydev)
{}

static irqreturn_t lan88xx_handle_interrupt(struct phy_device *phydev)
{}

static int lan88xx_suspend(struct phy_device *phydev)
{}

static int lan88xx_TR_reg_set(struct phy_device *phydev, u16 regaddr,
			      u32 data)
{}

static void lan88xx_config_TR_regs(struct phy_device *phydev)
{}

static int lan88xx_probe(struct phy_device *phydev)
{}

static void lan88xx_remove(struct phy_device *phydev)
{}

static int lan88xx_set_wol(struct phy_device *phydev,
			   struct ethtool_wolinfo *wol)
{}

static void lan88xx_set_mdix(struct phy_device *phydev)
{}

static int lan88xx_config_init(struct phy_device *phydev)
{}

static int lan88xx_config_aneg(struct phy_device *phydev)
{}

static void lan88xx_link_change_notify(struct phy_device *phydev)
{}

/**
 * lan937x_tx_read_mdix_status - Read the MDIX status for the LAN937x TX PHY.
 * @phydev: Pointer to the phy_device structure.
 *
 * This function reads the MDIX status of the LAN937x TX PHY and sets the
 * mdix_ctrl and mdix fields of the phy_device structure accordingly.
 * Note that MDIX status is not supported in AUTO mode, and will be set
 * to invalid in such cases.
 *
 * Return: 0 on success, a negative error code on failure.
 */
static int lan937x_tx_read_mdix_status(struct phy_device *phydev)
{}

/**
 * lan937x_tx_read_status - Read the status for the LAN937x TX PHY.
 * @phydev: Pointer to the phy_device structure.
 *
 * This function reads the status of the LAN937x TX PHY and updates the
 * phy_device structure accordingly.
 *
 * Return: 0 on success, a negative error code on failure.
 */
static int lan937x_tx_read_status(struct phy_device *phydev)
{}

/**
 * lan937x_tx_set_mdix - Set the MDIX mode for the LAN937x TX PHY.
 * @phydev: Pointer to the phy_device structure.
 *
 * This function configures the MDIX mode of the LAN937x TX PHY based on the
 * mdix_ctrl field of the phy_device structure. The MDIX mode can be set to
 * MDI (straight-through), MDIX (crossover), or AUTO (auto-MDIX). If the mode
 * is not recognized, it returns 0 without making any changes.
 *
 * Return: 0 on success, a negative error code on failure.
 */
static int lan937x_tx_set_mdix(struct phy_device *phydev)
{}

/**
 * lan937x_tx_config_aneg - Configure auto-negotiation and fixed modes for the
 *                          LAN937x TX PHY.
 * @phydev: Pointer to the phy_device structure.
 *
 * This function configures the MDIX mode for the LAN937x TX PHY and then
 * proceeds to configure the auto-negotiation or fixed mode settings
 * based on the phy_device structure.
 *
 * Return: 0 on success, a negative error code on failure.
 */
static int lan937x_tx_config_aneg(struct phy_device *phydev)
{}

static struct phy_driver microchip_phy_driver[] =;

module_phy_driver(microchip_phy_driver);

static struct mdio_device_id __maybe_unused microchip_tbl[] =;

MODULE_DEVICE_TABLE(mdio, microchip_tbl);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();