linux/drivers/pinctrl/pinctrl-mcp23s08_spi.c

// SPDX-License-Identifier: GPL-2.0-only
/* MCP23S08 SPI GPIO driver */

#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

/*
 * A given spi_device can represent up to eight mcp23sxx chips
 * sharing the same chipselect but using different addresses
 * (e.g. chips #0 and #3 might be populated, but not #1 or #2).
 * Driver data holds all the per-chip data.
 */
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)
{}

/*
 * Register after SPI postcore initcall and before
 * subsys initcalls that may rely on these GPIOs.
 */
subsys_initcall(mcp23s08_spi_init);

static void mcp23s08_spi_exit(void)
{}
module_exit(mcp23s08_spi_exit);

MODULE_DESCRIPTION();
MODULE_LICENSE();