#include <linux/clk.h>
#include <linux/spi/spi.h>
#include <linux/crc7.h>
#include <linux/crc-itu-t.h>
#include <linux/gpio/consumer.h>
#include "netdev.h"
#include "cfg80211.h"
#define SPI_MODALIAS …
static bool enable_crc7;
module_param(enable_crc7, bool, 0644);
MODULE_PARM_DESC(…) …;
static bool enable_crc16;
module_param(enable_crc16, bool, 0644);
MODULE_PARM_DESC(…) …;
#define WILC_SPI_RSP_HDR_EXTRA_DATA …
struct wilc_spi { … };
static const struct wilc_hif_func wilc_hif_spi;
static int wilc_spi_reset(struct wilc *wilc);
static int wilc_spi_configure_bus_protocol(struct wilc *wilc);
static int wilc_validate_chipid(struct wilc *wilc);
#define CMD_DMA_WRITE …
#define CMD_DMA_READ …
#define CMD_INTERNAL_WRITE …
#define CMD_INTERNAL_READ …
#define CMD_TERMINATE …
#define CMD_REPEAT …
#define CMD_DMA_EXT_WRITE …
#define CMD_DMA_EXT_READ …
#define CMD_SINGLE_WRITE …
#define CMD_SINGLE_READ …
#define CMD_RESET …
#define SPI_RETRY_MAX_LIMIT …
#define SPI_ENABLE_VMM_RETRY_LIMIT …
#define RSP_START_FIELD …
#define RSP_TYPE_FIELD …
#define RSP_START_TAG …
#define RSP_TYPE_FIRST_PACKET …
#define RSP_TYPE_INNER_PACKET …
#define RSP_TYPE_LAST_PACKET …
#define RSP_STATE_NO_ERROR …
#define PROTOCOL_REG_PKT_SZ_MASK …
#define PROTOCOL_REG_CRC16_MASK …
#define PROTOCOL_REG_CRC7_MASK …
#define DATA_PKT_LOG_SZ_MIN …
#define DATA_PKT_LOG_SZ_MAX …
#define DATA_PKT_LOG_SZ …
#define DATA_PKT_SZ …
#define WILC_SPI_COMMAND_STAT_SUCCESS …
#define WILC_GET_RESP_HDR_START(h) …
struct wilc_spi_cmd { … } __packed;
struct wilc_spi_read_rsp_data { … } __packed;
struct wilc_spi_rsp_data { … } __packed;
struct wilc_spi_special_cmd_rsp { … } __packed;
static int wilc_parse_gpios(struct wilc *wilc)
{ … }
static void wilc_wlan_power(struct wilc *wilc, bool on)
{ … }
static int wilc_bus_probe(struct spi_device *spi)
{ … }
static void wilc_bus_remove(struct spi_device *spi)
{ … }
static const struct of_device_id wilc_of_match[] = …;
MODULE_DEVICE_TABLE(of, wilc_of_match);
static const struct spi_device_id wilc_spi_id[] = …;
MODULE_DEVICE_TABLE(spi, wilc_spi_id);
static struct spi_driver wilc_spi_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
{ … }
static int wilc_spi_rx(struct wilc *wilc, u8 *rb, u32 rlen)
{ … }
static int wilc_spi_tx_rx(struct wilc *wilc, u8 *wb, u8 *rb, u32 rlen)
{ … }
static int spi_data_write(struct wilc *wilc, u8 *b, u32 sz)
{ … }
static u8 wilc_get_crc7(u8 *buffer, u32 len)
{ … }
static int wilc_spi_single_read(struct wilc *wilc, u8 cmd, u32 adr, void *b,
u8 clockless)
{ … }
static int wilc_spi_write_cmd(struct wilc *wilc, u8 cmd, u32 adr, u32 data,
u8 clockless)
{ … }
static int wilc_spi_dma_rw(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz)
{ … }
static int wilc_spi_special_cmd(struct wilc *wilc, u8 cmd)
{ … }
static void wilc_spi_reset_cmd_sequence(struct wilc *wl, u8 attempt, u32 addr)
{ … }
static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
{ … }
static int wilc_spi_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
{ … }
static int spi_internal_write(struct wilc *wilc, u32 adr, u32 dat)
{ … }
static int spi_internal_read(struct wilc *wilc, u32 adr, u32 *data)
{ … }
static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, u32 data)
{ … }
static int spi_data_rsp(struct wilc *wilc, u8 cmd)
{ … }
static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
{ … }
static int wilc_spi_reset(struct wilc *wilc)
{ … }
static bool wilc_spi_is_init(struct wilc *wilc)
{ … }
static int wilc_spi_deinit(struct wilc *wilc)
{ … }
static int wilc_spi_init(struct wilc *wilc, bool resume)
{ … }
static int wilc_spi_configure_bus_protocol(struct wilc *wilc)
{ … }
static int wilc_validate_chipid(struct wilc *wilc)
{ … }
static int wilc_spi_read_size(struct wilc *wilc, u32 *size)
{ … }
static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)
{ … }
static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
{ … }
static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
{ … }
static const struct wilc_hif_func wilc_hif_spi = …;