linux/drivers/net/can/m_can/tcan4x5x-core.c

// SPDX-License-Identifier: GPL-2.0
// SPI to CAN driver for the Texas Instruments TCAN4x5x
// Copyright (C) 2018-19 Texas Instruments Incorporated - http://www.ti.com/

#include "tcan4x5x.h"

#define TCAN4X5X_EXT_CLK_DEF

#define TCAN4X5X_DEV_ID1
#define TCAN4X5X_DEV_ID1_TCAN
#define TCAN4X5X_DEV_ID2
#define TCAN4X5X_REV
#define TCAN4X5X_STATUS
#define TCAN4X5X_ERROR_STATUS_MASK
#define TCAN4X5X_CONTROL

#define TCAN4X5X_CONFIG
#define TCAN4X5X_TS_PRESCALE
#define TCAN4X5X_TEST_REG
#define TCAN4X5X_INT_FLAGS
#define TCAN4X5X_MCAN_INT_REG
#define TCAN4X5X_INT_EN

/* Interrupt bits */
#define TCAN4X5X_CANBUSTERMOPEN_INT_EN
#define TCAN4X5X_CANHCANL_INT_EN
#define TCAN4X5X_CANHBAT_INT_EN
#define TCAN4X5X_CANLGND_INT_EN
#define TCAN4X5X_CANBUSOPEN_INT_EN
#define TCAN4X5X_CANBUSGND_INT_EN
#define TCAN4X5X_CANBUSBAT_INT_EN
#define TCAN4X5X_UVSUP_INT_EN
#define TCAN4X5X_UVIO_INT_EN
#define TCAN4X5X_TSD_INT_EN
#define TCAN4X5X_ECCERR_INT_EN
#define TCAN4X5X_CANINT_INT_EN
#define TCAN4X5X_LWU_INT_EN
#define TCAN4X5X_CANSLNT_INT_EN
#define TCAN4X5X_CANDOM_INT_EN
#define TCAN4X5X_CANBUS_ERR_INT_EN
#define TCAN4X5X_BUS_FAULT
#define TCAN4X5X_MCAN_INT
#define TCAN4X5X_ENABLE_TCAN_INT

/* MCAN Interrupt bits */
#define TCAN4X5X_MCAN_IR_ARA
#define TCAN4X5X_MCAN_IR_PED
#define TCAN4X5X_MCAN_IR_PEA
#define TCAN4X5X_MCAN_IR_WD
#define TCAN4X5X_MCAN_IR_BO
#define TCAN4X5X_MCAN_IR_EW
#define TCAN4X5X_MCAN_IR_EP
#define TCAN4X5X_MCAN_IR_ELO
#define TCAN4X5X_MCAN_IR_BEU
#define TCAN4X5X_MCAN_IR_BEC
#define TCAN4X5X_MCAN_IR_DRX
#define TCAN4X5X_MCAN_IR_TOO
#define TCAN4X5X_MCAN_IR_MRAF
#define TCAN4X5X_MCAN_IR_TSW
#define TCAN4X5X_MCAN_IR_TEFL
#define TCAN4X5X_MCAN_IR_TEFF
#define TCAN4X5X_MCAN_IR_TEFW
#define TCAN4X5X_MCAN_IR_TEFN
#define TCAN4X5X_MCAN_IR_TFE
#define TCAN4X5X_MCAN_IR_TCF
#define TCAN4X5X_MCAN_IR_TC
#define TCAN4X5X_MCAN_IR_HPM
#define TCAN4X5X_MCAN_IR_RF1L
#define TCAN4X5X_MCAN_IR_RF1F
#define TCAN4X5X_MCAN_IR_RF1W
#define TCAN4X5X_MCAN_IR_RF1N
#define TCAN4X5X_MCAN_IR_RF0L
#define TCAN4X5X_MCAN_IR_RF0F
#define TCAN4X5X_MCAN_IR_RF0W
#define TCAN4X5X_MCAN_IR_RF0N
#define TCAN4X5X_ENABLE_MCAN_INT

#define TCAN4X5X_MRAM_START
#define TCAN4X5X_MRAM_SIZE
#define TCAN4X5X_MCAN_OFFSET

#define TCAN4X5X_CLEAR_ALL_INT
#define TCAN4X5X_SET_ALL_INT

#define TCAN4X5X_MODE_SEL_MASK
#define TCAN4X5X_MODE_SLEEP
#define TCAN4X5X_MODE_STANDBY
#define TCAN4X5X_MODE_NORMAL

#define TCAN4X5X_DISABLE_WAKE_MSK
#define TCAN4X5X_DISABLE_INH_MSK

#define TCAN4X5X_SW_RESET

#define TCAN4X5X_MCAN_CONFIGURED
#define TCAN4X5X_WATCHDOG_EN
#define TCAN4X5X_WD_60_MS_TIMER
#define TCAN4X5X_WD_600_MS_TIMER
#define TCAN4X5X_WD_3_S_TIMER
#define TCAN4X5X_WD_6_S_TIMER

struct tcan4x5x_version_info {};

enum {};

static const struct tcan4x5x_version_info tcan4x5x_versions[] =;

static inline struct tcan4x5x_priv *cdev_to_priv(struct m_can_classdev *cdev)
{}

static void tcan4x5x_check_wake(struct tcan4x5x_priv *priv)
{}

static int tcan4x5x_reset(struct tcan4x5x_priv *priv)
{}

static u32 tcan4x5x_read_reg(struct m_can_classdev *cdev, int reg)
{}

static int tcan4x5x_read_fifo(struct m_can_classdev *cdev, int addr_offset,
			      void *val, size_t val_count)
{}

static int tcan4x5x_write_reg(struct m_can_classdev *cdev, int reg, int val)
{}

static int tcan4x5x_write_fifo(struct m_can_classdev *cdev,
			       int addr_offset, const void *val, size_t val_count)
{}

static int tcan4x5x_power_enable(struct regulator *reg, int enable)
{}

static int tcan4x5x_write_tcan_reg(struct m_can_classdev *cdev,
				   int reg, int val)
{}

static int tcan4x5x_clear_interrupts(struct m_can_classdev *cdev)
{}

static int tcan4x5x_init(struct m_can_classdev *cdev)
{}

static int tcan4x5x_disable_wake(struct m_can_classdev *cdev)
{}

static int tcan4x5x_disable_state(struct m_can_classdev *cdev)
{}

static const struct tcan4x5x_version_info
*tcan4x5x_find_version(struct tcan4x5x_priv *priv)
{}

static int tcan4x5x_get_gpios(struct m_can_classdev *cdev,
			      const struct tcan4x5x_version_info *version_info)
{}

static const struct m_can_ops tcan4x5x_ops =;

static int tcan4x5x_can_probe(struct spi_device *spi)
{}

static void tcan4x5x_can_remove(struct spi_device *spi)
{}

static int __maybe_unused tcan4x5x_suspend(struct device *dev)
{}

static int __maybe_unused tcan4x5x_resume(struct device *dev)
{}

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

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

static const struct dev_pm_ops tcan4x5x_pm_ops =;

static struct spi_driver tcan4x5x_can_driver =;
module_spi_driver();

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