linux/drivers/input/rmi4/rmi_driver.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2011-2016 Synaptics Incorporated
 * Copyright (c) 2011 Unixphere
 *
 * This driver provides the core support for a single RMI4-based device.
 *
 * The RMI4 specification can be found here (URL split for line length):
 *
 * http://www.synaptics.com/sites/default/files/
 *      511-000136-01-Rev-E-RMI4-Interfacing-Guide.pdf
 */

#include <linux/bitmap.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/irq.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/irqdomain.h>
#include <uapi/linux/input.h>
#include <linux/rmi.h>
#include "rmi_bus.h"
#include "rmi_driver.h"

#define HAS_NONSTANDARD_PDT_MASK
#define RMI4_MAX_PAGE
#define RMI4_PAGE_SIZE
#define RMI4_PAGE_MASK

#define RMI_DEVICE_RESET_CMD
#define DEFAULT_RESET_DELAY_MS

void rmi_free_function_list(struct rmi_device *rmi_dev)
{}

static int reset_one_function(struct rmi_function *fn)
{}

static int configure_one_function(struct rmi_function *fn)
{}

static int rmi_driver_process_reset_requests(struct rmi_device *rmi_dev)
{}

static int rmi_driver_process_config_requests(struct rmi_device *rmi_dev)
{}

static int rmi_process_interrupt_requests(struct rmi_device *rmi_dev)
{}

void rmi_set_attn_data(struct rmi_device *rmi_dev, unsigned long irq_status,
		       void *data, size_t size)
{}
EXPORT_SYMBOL_GPL();

static irqreturn_t rmi_irq_fn(int irq, void *dev_id)
{}

static int rmi_irq_init(struct rmi_device *rmi_dev)
{}

struct rmi_function *rmi_find_function(struct rmi_device *rmi_dev, u8 number)
{}

static int suspend_one_function(struct rmi_function *fn)
{}

static int rmi_suspend_functions(struct rmi_device *rmi_dev)
{}

static int resume_one_function(struct rmi_function *fn)
{}

static int rmi_resume_functions(struct rmi_device *rmi_dev)
{}

int rmi_enable_sensor(struct rmi_device *rmi_dev)
{}

/**
 * rmi_driver_set_input_params - set input device id and other data.
 *
 * @rmi_dev: Pointer to an RMI device
 * @input: Pointer to input device
 *
 */
static int rmi_driver_set_input_params(struct rmi_device *rmi_dev,
				struct input_dev *input)
{}

static void rmi_driver_set_input_name(struct rmi_device *rmi_dev,
				struct input_dev *input)
{}

static int rmi_driver_set_irq_bits(struct rmi_device *rmi_dev,
				   unsigned long *mask)
{}

static int rmi_driver_clear_irq_bits(struct rmi_device *rmi_dev,
				     unsigned long *mask)
{}

static int rmi_driver_reset_handler(struct rmi_device *rmi_dev)
{}

static int rmi_read_pdt_entry(struct rmi_device *rmi_dev,
			      struct pdt_entry *entry, u16 pdt_address)
{}

static void rmi_driver_copy_pdt_to_fd(const struct pdt_entry *pdt,
				      struct rmi_function_descriptor *fd)
{}

#define RMI_SCAN_CONTINUE
#define RMI_SCAN_DONE

static int rmi_scan_pdt_page(struct rmi_device *rmi_dev,
			     int page,
			     int *empty_pages,
			     void *ctx,
			     int (*callback)(struct rmi_device *rmi_dev,
					     void *ctx,
					     const struct pdt_entry *entry))
{}

int rmi_scan_pdt(struct rmi_device *rmi_dev, void *ctx,
		 int (*callback)(struct rmi_device *rmi_dev,
		 void *ctx, const struct pdt_entry *entry))
{}

int rmi_read_register_desc(struct rmi_device *d, u16 addr,
				struct rmi_register_descriptor *rdesc)
{}

const struct rmi_register_desc_item *rmi_get_register_desc_item(
				struct rmi_register_descriptor *rdesc, u16 reg)
{}

size_t rmi_register_desc_calc_size(struct rmi_register_descriptor *rdesc)
{}

/* Compute the register offset relative to the base address */
int rmi_register_desc_calc_reg_offset(
		struct rmi_register_descriptor *rdesc, u16 reg)
{}

bool rmi_register_desc_has_subpacket(const struct rmi_register_desc_item *item,
	u8 subpacket)
{}

static int rmi_check_bootloader_mode(struct rmi_device *rmi_dev,
				     const struct pdt_entry *pdt)
{}

static int rmi_count_irqs(struct rmi_device *rmi_dev,
			 void *ctx, const struct pdt_entry *pdt)
{}

int rmi_initial_reset(struct rmi_device *rmi_dev, void *ctx,
		      const struct pdt_entry *pdt)
{}

static int rmi_create_function(struct rmi_device *rmi_dev,
			       void *ctx, const struct pdt_entry *pdt)
{}

void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake)
{}

void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake)
{}

int rmi_driver_suspend(struct rmi_device *rmi_dev, bool enable_wake)
{}
EXPORT_SYMBOL_GPL();

int rmi_driver_resume(struct rmi_device *rmi_dev, bool clear_wake)
{}
EXPORT_SYMBOL_GPL();

static int rmi_driver_remove(struct device *dev)
{}

#ifdef CONFIG_OF
static int rmi_driver_of_probe(struct device *dev,
				struct rmi_device_platform_data *pdata)
{}
#else
static inline int rmi_driver_of_probe(struct device *dev,
					struct rmi_device_platform_data *pdata)
{
	return -ENODEV;
}
#endif

int rmi_probe_interrupts(struct rmi_driver_data *data)
{}

int rmi_init_functions(struct rmi_driver_data *data)
{}

static int rmi_driver_probe(struct device *dev)
{}

static struct rmi_driver rmi_physical_driver =;

bool rmi_is_physical_driver(const struct device_driver *drv)
{}

int __init rmi_register_physical_driver(void)
{}

void __exit rmi_unregister_physical_driver(void)
{}