linux/drivers/net/wireless/st/cw1200/cw1200_spi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Mac80211 SPI driver for ST-Ericsson CW1200 device
 *
 * Copyright (c) 2011, Sagrad Inc.
 * Author:  Solomon Peachy <[email protected]>
 *
 * Based on cw1200_sdio.c
 * Copyright (c) 2010, ST-Ericsson
 * Author: Dmitry Tarnyagin <[email protected]>
 */

#include <linux/module.h>
#include <linux/gpio/consumer.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <net/mac80211.h>

#include <linux/spi/spi.h>
#include <linux/device.h>

#include "cw1200.h"
#include "hwbus.h"
#include <linux/platform_data/net-cw1200.h>
#include "hwio.h"

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

/* #define SPI_DEBUG */

struct hwbus_priv {};

#define SDIO_TO_SPI_ADDR(addr)
#define SET_WRITE
#define SET_READ

/* Notes on byte ordering:
   LE:  B0 B1 B2 B3
   BE:  B3 B2 B1 B0

   Hardware expects 32-bit data to be written as 16-bit BE words:

   B1 B0 B3 B2
*/

static int cw1200_spi_memcpy_fromio(struct hwbus_priv *self,
				     unsigned int addr,
				     void *dst, int count)
{}

static int cw1200_spi_memcpy_toio(struct hwbus_priv *self,
				   unsigned int addr,
				   const void *src, int count)
{}

static void cw1200_spi_lock(struct hwbus_priv *self)
{}

static void cw1200_spi_unlock(struct hwbus_priv *self)
{}

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

static int cw1200_spi_irq_subscribe(struct hwbus_priv *self)
{}

static void cw1200_spi_irq_unsubscribe(struct hwbus_priv *self)
{}

static int cw1200_spi_off(struct hwbus_priv *self, const struct cw1200_platform_data_spi *pdata)
{}

static int cw1200_spi_on(struct hwbus_priv *self, const struct cw1200_platform_data_spi *pdata)
{}

static size_t cw1200_spi_align_size(struct hwbus_priv *self, size_t size)
{}

static int cw1200_spi_pm(struct hwbus_priv *self, bool suspend)
{}

static const struct hwbus_ops cw1200_spi_hwbus_ops =;

/* Probe Function to be called by SPI stack when device is discovered */
static int cw1200_spi_probe(struct spi_device *func)
{}

/* Disconnect Function to be called by SPI stack when device is disconnected */
static void cw1200_spi_disconnect(struct spi_device *func)
{}

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

static SIMPLE_DEV_PM_OPS(cw1200_pm_ops, cw1200_spi_suspend, NULL);

static struct spi_driver spi_driver =;

module_spi_driver();