linux/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2015 - 2023 Beijing WangXun Technology Co., Ltd. */

#include <linux/gpio/machine.h>
#include <linux/gpio/driver.h>
#include <linux/gpio/property.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/i2c.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/pcs/pcs-xpcs.h>
#include <linux/phylink.h>

#include "../libwx/wx_type.h"
#include "../libwx/wx_lib.h"
#include "../libwx/wx_hw.h"
#include "txgbe_type.h"
#include "txgbe_phy.h"
#include "txgbe_hw.h"

static int txgbe_swnodes_register(struct txgbe *txgbe)
{}

static int txgbe_pcs_read(struct mii_bus *bus, int addr, int devnum, int regnum)
{}

static int txgbe_pcs_write(struct mii_bus *bus, int addr, int devnum, int regnum, u16 val)
{}

static int txgbe_mdio_pcs_init(struct txgbe *txgbe)
{}

static struct phylink_pcs *txgbe_phylink_mac_select(struct phylink_config *config,
						    phy_interface_t interface)
{}

static void txgbe_mac_config(struct phylink_config *config, unsigned int mode,
			     const struct phylink_link_state *state)
{}

static void txgbe_mac_link_down(struct phylink_config *config,
				unsigned int mode, phy_interface_t interface)
{}

static void txgbe_mac_link_up(struct phylink_config *config,
			      struct phy_device *phy,
			      unsigned int mode, phy_interface_t interface,
			      int speed, int duplex,
			      bool tx_pause, bool rx_pause)
{}

static int txgbe_mac_prepare(struct phylink_config *config, unsigned int mode,
			     phy_interface_t interface)
{}

static int txgbe_mac_finish(struct phylink_config *config, unsigned int mode,
			    phy_interface_t interface)
{}

static const struct phylink_mac_ops txgbe_mac_ops =;

static int txgbe_phylink_init(struct txgbe *txgbe)
{}

irqreturn_t txgbe_link_irq_handler(int irq, void *data)
{}

static int txgbe_gpio_get(struct gpio_chip *chip, unsigned int offset)
{}

static int txgbe_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
{}

static int txgbe_gpio_direction_in(struct gpio_chip *chip, unsigned int offset)
{}

static int txgbe_gpio_direction_out(struct gpio_chip *chip, unsigned int offset,
				    int val)
{}

static void txgbe_gpio_irq_ack(struct irq_data *d)
{}

static void txgbe_gpio_irq_mask(struct irq_data *d)
{}

static void txgbe_gpio_irq_unmask(struct irq_data *d)
{}

static void txgbe_toggle_trigger(struct gpio_chip *gc, unsigned int offset)
{}

static int txgbe_gpio_set_type(struct irq_data *d, unsigned int type)
{}

static const struct irq_chip txgbe_gpio_irq_chip =;

irqreturn_t txgbe_gpio_irq_handler(int irq, void *data)
{}

void txgbe_reinit_gpio_intr(struct wx *wx)
{}

static int txgbe_gpio_init(struct txgbe *txgbe)
{}

static int txgbe_clock_register(struct txgbe *txgbe)
{}

static int txgbe_i2c_read(void *context, unsigned int reg, unsigned int *val)
{}

static int txgbe_i2c_write(void *context, unsigned int reg, unsigned int val)
{}

static const struct regmap_config i2c_regmap_config =;

static int txgbe_i2c_register(struct txgbe *txgbe)
{}

static int txgbe_sfp_register(struct txgbe *txgbe)
{}

static int txgbe_ext_phy_init(struct txgbe *txgbe)
{}

int txgbe_init_phy(struct txgbe *txgbe)
{}

void txgbe_remove_phy(struct txgbe *txgbe)
{}