#include <linux/bits.h>
#include <linux/init.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include "bma400.h"
#define BMA400_MAX_SPI_READ …
#define BMA400_SPI_READ_BUFFER_SIZE …
static int bma400_regmap_spi_read(void *context,
const void *reg, size_t reg_size,
void *val, size_t val_size)
{ … }
static int bma400_regmap_spi_write(void *context, const void *data,
size_t count)
{ … }
static const struct regmap_bus bma400_regmap_bus = …;
static int bma400_spi_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id bma400_spi_ids[] = …;
MODULE_DEVICE_TABLE(spi, bma400_spi_ids);
static const struct of_device_id bma400_of_spi_match[] = …;
MODULE_DEVICE_TABLE(of, bma400_of_spi_match);
static struct spi_driver bma400_spi_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_IMPORT_NS(…);