linux/drivers/input/rmi4/rmi_spi.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2011-2016 Synaptics Incorporated
 * Copyright (c) 2011 Unixphere
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/rmi.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/of.h>
#include "rmi_driver.h"

#define RMI_SPI_DEFAULT_XFER_BUF_SIZE

#define RMI_PAGE_SELECT_REGISTER
#define RMI_SPI_PAGE(addr)
#define RMI_SPI_XFER_SIZE_LIMIT

#define BUFFER_SIZE_INCREMENT

enum rmi_spi_op {};

struct rmi_spi_cmd {};

struct rmi_spi_xport {};

static int rmi_spi_manage_pools(struct rmi_spi_xport *rmi_spi, int len)
{}

static int rmi_spi_xfer(struct rmi_spi_xport *rmi_spi,
			const struct rmi_spi_cmd *cmd, const u8 *tx_buf,
			int tx_len, u8 *rx_buf, int rx_len)
{}

/*
 * rmi_set_page - Set RMI page
 * @xport: The pointer to the rmi_transport_dev struct
 * @page: The new page address.
 *
 * RMI devices have 16-bit addressing, but some of the transport
 * implementations (like SMBus) only have 8-bit addressing. So RMI implements
 * a page address at 0xff of every page so we can reliable page addresses
 * every 256 registers.
 *
 * The page_mutex lock must be held when this function is entered.
 *
 * Returns zero on success, non-zero on failure.
 */
static int rmi_set_page(struct rmi_spi_xport *rmi_spi, u8 page)
{}

static int rmi_spi_write_block(struct rmi_transport_dev *xport, u16 addr,
			       const void *buf, size_t len)
{}

static int rmi_spi_read_block(struct rmi_transport_dev *xport, u16 addr,
			      void *buf, size_t len)
{}

static const struct rmi_transport_ops rmi_spi_ops =;

#ifdef CONFIG_OF
static int rmi_spi_of_probe(struct spi_device *spi,
			struct rmi_device_platform_data *pdata)
{}

static const struct of_device_id rmi_spi_of_match[] =;
MODULE_DEVICE_TABLE(of, rmi_spi_of_match);
#else
static inline int rmi_spi_of_probe(struct spi_device *spi,
				struct rmi_device_platform_data *pdata)
{
	return -ENODEV;
}
#endif

static void rmi_spi_unregister_transport(void *data)
{}

static int rmi_spi_probe(struct spi_device *spi)
{}

static int rmi_spi_suspend(struct device *dev)
{}

static int rmi_spi_resume(struct device *dev)
{}

static int rmi_spi_runtime_suspend(struct device *dev)
{}

static int rmi_spi_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops rmi_spi_pm =;

static const struct spi_device_id rmi_id[] =;
MODULE_DEVICE_TABLE(spi, rmi_id);

static struct spi_driver rmi_spi_driver =;

module_spi_driver();

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