#include <linux/kernel.h>
#include <linux/rmi.h>
#include <linux/input.h>
#include <linux/slab.h>
#include "rmi_driver.h"
#define RMI_F30_QUERY_SIZE …
#define RMI_F30_EXTENDED_PATTERNS …
#define RMI_F30_HAS_MAPPABLE_BUTTONS …
#define RMI_F30_HAS_LED …
#define RMI_F30_HAS_GPIO …
#define RMI_F30_HAS_HAPTIC …
#define RMI_F30_HAS_GPIO_DRV_CTL …
#define RMI_F30_HAS_MECH_MOUSE_BTNS …
#define RMI_F30_GPIO_LED_COUNT …
#define RMI_F30_CTRL_1_GPIO_DEBOUNCE …
#define RMI_F30_CTRL_1_HALT …
#define RMI_F30_CTRL_1_HALTED …
#define RMI_F30_CTRL_10_NUM_MECH_MOUSE_BTNS …
#define RMI_F30_CTRL_MAX_REGS …
#define RMI_F30_CTRL_MAX_BYTES …
#define RMI_F30_CTRL_MAX_REG_BLOCKS …
#define RMI_F30_CTRL_REGS_MAX_SIZE …
#define TRACKSTICK_RANGE_START …
#define TRACKSTICK_RANGE_END …
struct rmi_f30_ctrl_data { … };
struct f30_data { … };
static int rmi_f30_read_control_parameters(struct rmi_function *fn,
struct f30_data *f30)
{ … }
static void rmi_f30_report_button(struct rmi_function *fn,
struct f30_data *f30, unsigned int button)
{ … }
static irqreturn_t rmi_f30_attention(int irq, void *ctx)
{ … }
static int rmi_f30_config(struct rmi_function *fn)
{ … }
static void rmi_f30_set_ctrl_data(struct rmi_f30_ctrl_data *ctrl,
int *ctrl_addr, int len, u8 **reg)
{ … }
static bool rmi_f30_is_valid_button(int button, struct rmi_f30_ctrl_data *ctrl)
{ … }
static int rmi_f30_map_gpios(struct rmi_function *fn,
struct f30_data *f30)
{ … }
static int rmi_f30_initialize(struct rmi_function *fn, struct f30_data *f30)
{ … }
static int rmi_f30_probe(struct rmi_function *fn)
{ … }
struct rmi_function_handler rmi_f30_handler = …;