linux/drivers/net/phy/fixed_phy.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Fixed MDIO bus (MDIO bus emulation with fixed PHYs)
 *
 * Author: Vitaly Bordug <[email protected]>
 *         Anton Vorontsov <[email protected]>
 *
 * Copyright (c) 2006-2007 MontaVista Software, Inc.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/list.h>
#include <linux/mii.h>
#include <linux/phy.h>
#include <linux/phy_fixed.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <linux/idr.h>
#include <linux/netdevice.h>
#include <linux/linkmode.h>

#include "swphy.h"

struct fixed_mdio_bus {};

struct fixed_phy {};

static struct platform_device *pdev;
static struct fixed_mdio_bus platform_fmb =;

int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier)
{}
EXPORT_SYMBOL_GPL();

static void fixed_phy_update(struct fixed_phy *fp)
{}

static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
{}

static int fixed_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num,
			    u16 val)
{}

/*
 * If something weird is required to be done with link/speed,
 * network driver is able to assign a function to implement this.
 * May be useful for PHY's that need to be software-driven.
 */
int fixed_phy_set_link_update(struct phy_device *phydev,
			      int (*link_update)(struct net_device *,
						 struct fixed_phy_status *))
{}
EXPORT_SYMBOL_GPL();

static int fixed_phy_add_gpiod(unsigned int irq, int phy_addr,
			       struct fixed_phy_status *status,
			       struct gpio_desc *gpiod)
{}

int fixed_phy_add(unsigned int irq, int phy_addr,
		  struct fixed_phy_status *status)
{}
EXPORT_SYMBOL_GPL();

static DEFINE_IDA(phy_fixed_ida);

static void fixed_phy_del(int phy_addr)
{}

#ifdef CONFIG_OF_GPIO
static struct gpio_desc *fixed_phy_get_gpiod(struct device_node *np)
{}
#else
static struct gpio_desc *fixed_phy_get_gpiod(struct device_node *np)
{
	return NULL;
}
#endif

static struct phy_device *__fixed_phy_register(unsigned int irq,
					       struct fixed_phy_status *status,
					       struct device_node *np,
					       struct gpio_desc *gpiod)
{}

struct phy_device *fixed_phy_register(unsigned int irq,
				      struct fixed_phy_status *status,
				      struct device_node *np)
{}
EXPORT_SYMBOL_GPL();

struct phy_device *
fixed_phy_register_with_gpiod(unsigned int irq,
			      struct fixed_phy_status *status,
			      struct gpio_desc *gpiod)
{}
EXPORT_SYMBOL_GPL();

void fixed_phy_unregister(struct phy_device *phy)
{}
EXPORT_SYMBOL_GPL();

static int __init fixed_mdio_bus_init(void)
{}
module_init();

static void __exit fixed_mdio_bus_exit(void)
{}
module_exit(fixed_mdio_bus_exit);

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