linux/drivers/net/can/usb/etas_es58x/es581_4.c

// SPDX-License-Identifier: GPL-2.0

/* Driver for ETAS GmbH ES58X USB CAN(-FD) Bus Interfaces.
 *
 * File es581_4.c: Adds support to ETAS ES581.4.
 *
 * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved.
 * Copyright (c) 2020 ETAS K.K.. All rights reserved.
 * Copyright (c) 2020-2022 Vincent Mailhol <[email protected]>
 */

#include <asm/unaligned.h>
#include <linux/kernel.h>
#include <linux/units.h>

#include "es58x_core.h"
#include "es581_4.h"

/**
 * es581_4_sizeof_rx_tx_msg() - Calculate the actual length of the
 *	structure of a rx or tx message.
 * @msg: message of variable length, must have a dlc field.
 *
 * Even if RTR frames have actually no payload, the ES58X devices
 * still expect it. Must be a macro in order to accept several types
 * (struct es581_4_tx_can_msg and struct es581_4_rx_can_msg) as an
 * input.
 *
 * Return: length of the message.
 */
#define es581_4_sizeof_rx_tx_msg(msg)

static u16 es581_4_get_msg_len(const union es58x_urb_cmd *urb_cmd)
{}

static int es581_4_echo_msg(struct es58x_device *es58x_dev,
			    const struct es581_4_urb_cmd *es581_4_urb_cmd)
{}

static int es581_4_rx_can_msg(struct es58x_device *es58x_dev,
			      const struct es581_4_urb_cmd *es581_4_urb_cmd,
			      u16 msg_len)
{}

static int es581_4_rx_err_msg(struct es58x_device *es58x_dev,
			      const struct es581_4_rx_err_msg *rx_err_msg)
{}

static int es581_4_rx_event_msg(struct es58x_device *es58x_dev,
				const struct es581_4_rx_event_msg *rx_event_msg)
{}

static int es581_4_rx_cmd_ret_u32(struct es58x_device *es58x_dev,
				  const struct es581_4_urb_cmd *es581_4_urb_cmd,
				  enum es58x_ret_type ret_type)
{}

static int es581_4_tx_ack_msg(struct es58x_device *es58x_dev,
			      const struct es581_4_urb_cmd *es581_4_urb_cmd)
{}

static int es581_4_dispatch_rx_cmd(struct es58x_device *es58x_dev,
				   const struct es581_4_urb_cmd *es581_4_urb_cmd)
{}

static int es581_4_handle_urb_cmd(struct es58x_device *es58x_dev,
				  const union es58x_urb_cmd *urb_cmd)
{}

static void es581_4_fill_urb_header(union es58x_urb_cmd *urb_cmd, u8 cmd_type,
				    u8 cmd_id, u8 channel_idx, u16 msg_len)
{}

static int es581_4_tx_can_msg(struct es58x_priv *priv,
			      const struct sk_buff *skb)
{}

static int es581_4_set_bittiming(struct es58x_priv *priv)
{}

static int es581_4_enable_channel(struct es58x_priv *priv)
{}

static int es581_4_disable_channel(struct es58x_priv *priv)
{}

static int es581_4_reset_device(struct es58x_device *es58x_dev)
{}

static int es581_4_get_timestamp(struct es58x_device *es58x_dev)
{}

/* Nominal bittiming constants for ES581.4 as specified in the
 * microcontroller datasheet: "Stellaris(R) LM3S5B91 Microcontroller"
 * table 17-4 "CAN Protocol Ranges" from Texas Instruments.
 */
static const struct can_bittiming_const es581_4_bittiming_const =;

const struct es58x_parameters es581_4_param =;

const struct es58x_operators es581_4_ops =;