linux-stable/drivers/net/can/m_can/tcan4x5x.h
Wan Jiabing 6c23fe67e8 can: tcan4x5x: remove duplicate include of regmap.h
linux/regmap.h has been included at line 13, so remove the duplicate
one at line 14.

Fixes: 67def4ef8b ("can: tcan4x5x: move regmap code into seperate file")
Link: https://lore.kernel.org/r/20210323021026.140460-1-wanjiabing@vivo.com
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-03-30 11:14:48 +02:00

56 lines
1.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0
*
* tcan4x5x - Texas Instruments TCAN4x5x Family CAN controller driver
*
* Copyright (c) 2020 Pengutronix,
* Marc Kleine-Budde <kernel@pengutronix.de>
*/
#ifndef _TCAN4X5X_H
#define _TCAN4X5X_H
#include <linux/gpio/consumer.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include "m_can.h"
#define TCAN4X5X_SANITIZE_SPI 1
struct __packed tcan4x5x_buf_cmd {
u8 cmd;
__be16 addr;
u8 len;
};
struct tcan4x5x_map_buf {
struct tcan4x5x_buf_cmd cmd;
u8 data[256 * sizeof(u32)];
} ____cacheline_aligned;
struct tcan4x5x_priv {
struct m_can_classdev cdev;
struct regmap *regmap;
struct spi_device *spi;
struct gpio_desc *reset_gpio;
struct gpio_desc *device_wake_gpio;
struct gpio_desc *device_state_gpio;
struct regulator *power;
struct tcan4x5x_map_buf map_buf_rx;
struct tcan4x5x_map_buf map_buf_tx;
};
static inline void
tcan4x5x_spi_cmd_set_len(struct tcan4x5x_buf_cmd *cmd, u8 len)
{
/* number of u32 */
cmd->len = len >> 2;
}
int tcan4x5x_regmap_init(struct tcan4x5x_priv *priv);
#endif