linux/drivers/net/can/softing/softing_main.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2008-2010
 *
 * - Kurt Van Dijck, EIA Electronics
 */

#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <asm/io.h>

#include "softing.h"

#define TX_ECHO_SKB_MAX

/*
 * test is a specific CAN netdev
 * is online (ie. up 'n running, not sleeping, not busoff
 */
static inline int canif_is_active(struct net_device *netdev)
{}

/* reset DPRAM */
static inline void softing_set_reset_dpram(struct softing *card)
{}

static inline void softing_clr_reset_dpram(struct softing *card)
{}

/* trigger the tx queue-ing */
static netdev_tx_t softing_netdev_start_xmit(struct sk_buff *skb,
		struct net_device *dev)
{}

/*
 * shortcut for skb delivery
 */
int softing_netdev_rx(struct net_device *netdev, const struct can_frame *msg,
		ktime_t ktime)
{}

/*
 * softing_handle_1
 * pop 1 entry from the DPRAM queue, and process
 */
static int softing_handle_1(struct softing *card)
{}

/*
 * real interrupt handler
 */
static irqreturn_t softing_irq_thread(int irq, void *dev_id)
{}

/*
 * interrupt routines:
 * schedule the 'real interrupt handler'
 */
static irqreturn_t softing_irq_v2(int irq, void *dev_id)
{}

static irqreturn_t softing_irq_v1(int irq, void *dev_id)
{}

/*
 * netdev/candev interoperability
 */
static int softing_netdev_open(struct net_device *ndev)
{}

static int softing_netdev_stop(struct net_device *ndev)
{}

static int softing_candev_set_mode(struct net_device *ndev, enum can_mode mode)
{}

/*
 * Softing device management helpers
 */
int softing_enable_irq(struct softing *card, int enable)
{}

static void softing_card_shutdown(struct softing *card)
{}

static int softing_card_boot(struct softing *card)
{}

/*
 * netdev sysfs
 */
static ssize_t show_chip(struct device *dev, struct device_attribute *attr,
		char *buf)
{}

static ssize_t show_output(struct device *dev, struct device_attribute *attr,
		char *buf)
{}

static ssize_t store_output(struct device *dev, struct device_attribute *attr,
		const char *buf, size_t count)
{}

static const DEVICE_ATTR(chip, 0444, show_chip, NULL);
static const DEVICE_ATTR(output, 0644, show_output, store_output);

static const struct attribute *const netdev_sysfs_attrs[] =;
static const struct attribute_group netdev_sysfs_group =;

static const struct net_device_ops softing_netdev_ops =;

static const struct ethtool_ops softing_ethtool_ops =;

static const struct can_bittiming_const softing_btr_const =;


static struct net_device *softing_netdev_create(struct softing *card,
						uint16_t chip_id)
{}

static int softing_netdev_register(struct net_device *netdev)
{}

static void softing_netdev_cleanup(struct net_device *netdev)
{}

/*
 * sysfs for Platform device
 */
#define DEV_ATTR_RO(name, member)

#define DEV_ATTR_RO_STR(name, member)

DEV_ATTR_RO();
DEV_ATTR_RO_STR();
DEV_ATTR_RO();
DEV_ATTR_RO_STR();
DEV_ATTR_RO();
DEV_ATTR_RO();

static struct attribute *softing_pdev_attrs[] =;

static const struct attribute_group softing_pdev_group =;

/*
 * platform driver
 */
static void softing_pdev_remove(struct platform_device *pdev)
{}

static int softing_pdev_probe(struct platform_device *pdev)
{}

static struct platform_driver softing_driver =;

module_platform_driver();

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