#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/spi/spi.h>
#include "pinctrl-mcp23s08.h"
#define MCP_MAX_DEV_PER_CS …
struct mcp23s08_driver_data { … };
static int mcp23sxx_spi_write(void *context, const void *data, size_t count)
{ … }
static int mcp23sxx_spi_gather_write(void *context,
const void *reg, size_t reg_size,
const void *val, size_t val_size)
{ … }
static int mcp23sxx_spi_read(void *context, const void *reg, size_t reg_size,
void *val, size_t val_size)
{ … }
static const struct regmap_bus mcp23sxx_spi_regmap = …;
static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev,
unsigned int addr,
const struct mcp23s08_info *info)
{ … }
static int mcp23s08_probe(struct spi_device *spi)
{ … }
static const struct mcp23s08_info mcp23s08_spi = …;
static const struct mcp23s08_info mcp23s17_spi = …;
static const struct mcp23s08_info mcp23s18_spi = …;
static const struct spi_device_id mcp23s08_ids[] = …;
MODULE_DEVICE_TABLE(spi, mcp23s08_ids);
static const struct of_device_id mcp23s08_spi_of_match[] = …;
MODULE_DEVICE_TABLE(of, mcp23s08_spi_of_match);
static struct spi_driver mcp23s08_driver = …;
static int __init mcp23s08_spi_init(void)
{ … }
subsys_initcall(mcp23s08_spi_init);
static void mcp23s08_spi_exit(void)
{ … }
module_exit(mcp23s08_spi_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;