linux/drivers/net/ethernet/vertexcom/mse102x.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (C) 2021 in-tech smart charging GmbH
 *
 * driver is based on micrel/ks8851_spi.c
 */

#define pr_fmt(fmt)

#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/cache.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>

#include <linux/spi/spi.h>
#include <linux/of_net.h>

#define MSG_DEFAULT

#define DRV_NAME

#define DET_CMD
#define DET_SOF
#define DET_DFT

#define CMD_SHIFT
#define CMD_RTS
#define CMD_CTR

#define CMD_MASK
#define LEN_MASK

#define DET_CMD_LEN
#define DET_SOF_LEN
#define DET_DFT_LEN

#define MIN_FREQ_HZ
#define MAX_FREQ_HZ

struct mse102x_stats {};

static const char mse102x_gstrings_stats[][ETH_GSTRING_LEN] =;

struct mse102x_net {};

struct mse102x_net_spi {};

#define to_mse102x_spi(mse)

#ifdef CONFIG_DEBUG_FS

static int mse102x_info_show(struct seq_file *s, void *what)
{}
DEFINE_SHOW_ATTRIBUTE();

static void mse102x_init_device_debugfs(struct mse102x_net_spi *mses)
{}

static void mse102x_remove_device_debugfs(struct mse102x_net_spi *mses)
{}

#else /* CONFIG_DEBUG_FS */

static void mse102x_init_device_debugfs(struct mse102x_net_spi *mses)
{
}

static void mse102x_remove_device_debugfs(struct mse102x_net_spi *mses)
{
}

#endif

/* SPI register read/write calls.
 *
 * All these calls issue SPI transactions to access the chip's registers. They
 * all require that the necessary lock is held to prevent accesses when the
 * chip is busy transferring packet data.
 */

static void mse102x_tx_cmd_spi(struct mse102x_net *mse, u16 cmd)
{}

static int mse102x_rx_cmd_spi(struct mse102x_net *mse, u8 *rxb)
{}

static inline void mse102x_push_header(struct sk_buff *skb)
{}

static inline void mse102x_put_footer(struct sk_buff *skb)
{}

static int mse102x_tx_frame_spi(struct mse102x_net *mse, struct sk_buff *txp,
				unsigned int pad)
{}

static int mse102x_rx_frame_spi(struct mse102x_net *mse, u8 *buff,
				unsigned int frame_len)
{}

static void mse102x_dump_packet(const char *msg, int len, const char *data)
{}

static void mse102x_rx_pkt_spi(struct mse102x_net *mse)
{}

static int mse102x_tx_pkt_spi(struct mse102x_net *mse, struct sk_buff *txb,
			      unsigned long work_timeout)
{}

#define TX_QUEUE_MAX

static void mse102x_tx_work(struct work_struct *work)
{}

static netdev_tx_t mse102x_start_xmit_spi(struct sk_buff *skb,
					  struct net_device *ndev)
{}

static void mse102x_init_mac(struct mse102x_net *mse, struct device_node *np)
{}

/* Assumption: this is called for every incoming packet */
static irqreturn_t mse102x_irq(int irq, void *_mse)
{}

static int mse102x_net_open(struct net_device *ndev)
{}

static int mse102x_net_stop(struct net_device *ndev)
{}

static const struct net_device_ops mse102x_netdev_ops =;

/* ethtool support */

static void mse102x_get_drvinfo(struct net_device *ndev,
				struct ethtool_drvinfo *di)
{}

static u32 mse102x_get_msglevel(struct net_device *ndev)
{}

static void mse102x_set_msglevel(struct net_device *ndev, u32 to)
{}

static void mse102x_get_ethtool_stats(struct net_device *ndev,
				      struct ethtool_stats *estats, u64 *data)
{}

static void mse102x_get_strings(struct net_device *ndev, u32 stringset, u8 *buf)
{}

static int mse102x_get_sset_count(struct net_device *ndev, int sset)
{}

static const struct ethtool_ops mse102x_ethtool_ops =;

/* driver bus management functions */

#ifdef CONFIG_PM_SLEEP

static int mse102x_suspend(struct device *dev)
{}

static int mse102x_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(mse102x_pm_ops, mse102x_suspend, mse102x_resume);

static int mse102x_probe_spi(struct spi_device *spi)
{}

static void mse102x_remove_spi(struct spi_device *spi)
{}

static const struct of_device_id mse102x_match_table[] =;
MODULE_DEVICE_TABLE(of, mse102x_match_table);

static const struct spi_device_id mse102x_ids[] =;
MODULE_DEVICE_TABLE(spi, mse102x_ids);

static struct spi_driver mse102x_driver =;
module_spi_driver();

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