#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(…) …;
struct hwbus_priv { … };
#define SDIO_TO_SPI_ADDR(addr) …
#define SET_WRITE …
#define SET_READ …
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 = …;
static int cw1200_spi_probe(struct spi_device *func)
{ … }
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(…) …;